diff options
author | Chuck Short <zulcss@ubuntu.com> | 2009-05-14 12:11:49 +0200 |
---|---|---|
committer | Chuck Short <zulcss@ubuntu.com> | 2009-05-14 12:11:49 +0200 |
commit | ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0 (patch) | |
tree | 43ac6c2aa8d16a1f6d8d9fbf596605a4a9c1c32a /ec2-set-hostname.py | |
parent | dd112c3afe50c75ae9b00f142b550c6e0d95f47b (diff) | |
download | vyos-cloud-init-ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0.tar.gz vyos-cloud-init-ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0.zip |
* debian/init: Move init script to run before ssh and regenerate the ssh
host kes in the init script rather than /etc/rc.local (LP: #370628)
* ec2-set-apt-sources.py:
- Move sources.list to /var/ec2 so it doesnt get removed after user
reboots.
* ec2-set-defaults.py:
- Move locale to /var/ec2/ so it doesnt get remove after user reboots.
* ec2-set-hostname.py
- Create an /etc/hostname as well.
Diffstat (limited to 'ec2-set-hostname.py')
-rwxr-xr-x | ec2-set-hostname.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ec2-set-hostname.py b/ec2-set-hostname.py index 818d0e02..c4e56fc9 100755 --- a/ec2-set-hostname.py +++ b/ec2-set-hostname.py @@ -49,6 +49,12 @@ def set_hostname(filename): f = open("/etc/hosts", "w") f.write('%s' %(t)) f.close() + + os.system("rm /etc/hostname") + f = open("/etc/hostname", "w") + f.write('%s' %(t)) + f.close() + os.system('touch %s' %(filename)) id = get_ami_id() |