diff options
author | Chuck Short <zulcss@ubuntu.com> | 2009-04-06 23:04:49 +0100 |
---|---|---|
committer | Bazaar Package Importer <jamesw@ubuntu.com> | 2009-04-06 23:04:49 +0100 |
commit | c3ba031b7feb74bfbaf54fd73b599c95ed0df765 (patch) | |
tree | db1dafc0bbb13a0efe1ec3f8c46220d5937aea4f /ec2-fetch-credentials.py | |
parent | 6dddf16cb8dea2e1a96b3d613b81087df247fd3d (diff) | |
download | vyos-cloud-init-c3ba031b7feb74bfbaf54fd73b599c95ed0df765.tar.gz vyos-cloud-init-c3ba031b7feb74bfbaf54fd73b599c95ed0df765.zip |
* debian/control:
- Add python-cheetah and python-apt as a dependency.
* debian/ec2-config.cfg:
- Remove distro due to the change in ec2-set-apt-sources.py
* debian/inistall
- Install the templates in the right place.
* ec2-set-apt-sources.py:
- Use python-apt to update the sources.list.
Diffstat (limited to 'ec2-fetch-credentials.py')
-rwxr-xr-x | ec2-fetch-credentials.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ec2-fetch-credentials.py b/ec2-fetch-credentials.py index 52176003..68922878 100755 --- a/ec2-fetch-credentials.py +++ b/ec2-fetch-credentials.py @@ -20,6 +20,8 @@ # import urllib import os +import socket +import sys from configobj import ConfigObj api_ver = '2008-02-01' @@ -60,6 +62,16 @@ def setup_root_user(k,root_config): else: print "%s - I dont understand that opion." +def checkServer(): + s = socket.socket() + try: + address = '169.254.169.254' + port = 80 + s.connect((address,port)) + except socket.error, e: + print "!!! Unable to connect to %s" % address + sys.exit(0) + os.umask(077) if user == "": print "User must exist in %s" %(filename) |