From ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Thu, 14 May 2009 12:11:49 +0200 Subject: * 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. --- ec2-set-hostname.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ec2-set-hostname.py') 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() -- cgit v1.2.3