diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-01-19 18:35:07 +0000 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-01-19 18:35:07 +0000 |
commit | ee03480e670c10d48a4825a458fac18aaf4fbec0 (patch) | |
tree | eebc82706725efaa70eb9267791bb03f30c47678 /cloud-init.py | |
parent | 32eab86a04f4f6056b200e1cfac99ec0495cd5c0 (diff) | |
download | vyos-cloud-init-ee03480e670c10d48a4825a458fac18aaf4fbec0.tar.gz vyos-cloud-init-ee03480e670c10d48a4825a458fac18aaf4fbec0.zip |
initial /var/lib rework still lots to do. includes a fix for LP: #704509
LP: #704509
Diffstat (limited to 'cloud-init.py')
-rwxr-xr-x | cloud-init.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cloud-init.py b/cloud-init.py index 28828648..1278d2eb 100755 --- a/cloud-init.py +++ b/cloud-init.py @@ -56,6 +56,13 @@ def main(): if cmd == "start-local": source_type = "local" + if cmd == "start-local": + try: + cloudinit.initfs() + except: + warn("failed to initfs, likely bad things to come") + + cloudinit.logging_set_from_cfg_file() log = logging.getLogger() log.info(msg) @@ -74,6 +81,9 @@ def main(): sys.stderr.write("no instance data found in %s\n" % cmd) sys.exit(1) + # set this as the current instance + cloud.set_cur_instance() + # store the metadata cloud.update_cache() @@ -103,13 +113,6 @@ def main(): #print "user data is:" + cloud.get_user_data() - # set the defaults (like what ec2-set-defaults.py did) - try: - cloud.sem_and_run("set_defaults", "once-per-instance", - set_defaults,[ cloud ],False) - except: - warn("failed to set defaults\n") - # finish, send the cloud-config event cloud.initctl_emit() |