summaryrefslogtreecommitdiff
path: root/ec2-run-user-data.py
diff options
context:
space:
mode:
authorChuck Short <zulcss@ubuntu.com>2009-03-05 16:09:38 +0000
committerBazaar Package Importer <jamesw@ubuntu.com>2009-03-05 16:09:38 +0000
commit2d667f57536a532d84872404e19e777820692665 (patch)
tree31824cd5b9112f731a75b9ca990f6ab1b4557e91 /ec2-run-user-data.py
parentecc2046ac6f51196bc0aa2d940aa64b5a789060c (diff)
downloadvyos-cloud-init-2d667f57536a532d84872404e19e777820692665.tar.gz
vyos-cloud-init-2d667f57536a532d84872404e19e777820692665.zip
* ec2-fetch-credentials.py:
- Allow user to choose which user they wish to configure for. - Allow user to disable root user if they wish to. * ec2-set-defaults.py: - Set default timezone to UTC. - Set locale depending on zone. * debian/init: - Removed nash plugin. - Add ec2-set-defaults.
Diffstat (limited to 'ec2-run-user-data.py')
-rwxr-xr-xec2-run-user-data.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/ec2-run-user-data.py b/ec2-run-user-data.py
index 63820bed..56e5e538 100755
--- a/ec2-run-user-data.py
+++ b/ec2-run-user-data.py
@@ -47,16 +47,14 @@ filename = '/var/ec2/.already-ran.%s' % amiId
if os.path.exists(filename):
print "ec2-run-user-data already ran for this instance."
sys.exit(0)
-else:
- if user_data.startswith('#!'):
+elif user_data.startswith('#!'):
# run it
(fp, path) = tempfile.mkstemp()
os.write(fp,user_data)
os.close(fp);
os.chmod(path, 0700)
- os.system('cp %s /var/ec2/user-data' %(path))
- status = os.system('%s' % path)
+ status = os.system('%s | logger -t "user-data" ' % path)
os.unlink(path)
- os.system('touch /var/ec2/$s' %(filename))
+ os.system('touch %s' %(filename))
sys.exit(0)