diff options
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r-- | cloudinit/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index b0ee5fe8..04beca1e 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -439,7 +439,9 @@ class CloudInit: filepath = "%s/%s" % (boothooks_dir,filename) util.write_file(filepath, payload, 0700) try: - ret = subprocess.check_call([filepath]) + env=os.environ.copy() + env['INSTANCE_ID']= self.datasource.get_instance_id() + ret = subprocess.check_call([filepath], env=env) except subprocess.CalledProcessError as e: log.error("boothooks script %s returned %i" % (filepath,e.returncode)) |