diff options
Diffstat (limited to 'ec2init')
-rw-r--r-- | ec2init/CloudConfig.py | 3 | ||||
-rw-r--r-- | ec2init/__init__.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ec2init/CloudConfig.py b/ec2init/CloudConfig.py index 4875e999..d1699f09 100644 --- a/ec2init/CloudConfig.py +++ b/ec2init/CloudConfig.py @@ -38,7 +38,8 @@ class CloudConfig(): self.cloud.get_data_source() self.add_handler('apt-update-upgrade', self.h_apt_update_upgrade) self.add_handler('config-ssh') - self.add_handler('disable-ec2-metadata') + self.add_handler('disable-ec2-metadata', + self.h_disable_ec2_metadata, "always") self.add_handler('config-mounts') def get_config_obj(self,cfgfile): diff --git a/ec2init/__init__.py b/ec2init/__init__.py index b88e3ddd..918b9280 100644 --- a/ec2init/__init__.py +++ b/ec2init/__init__.py @@ -162,6 +162,7 @@ class EC2Init: return("%s/%s.%s" % (semdir,name,freqtok)) def sem_has_run(self,name,freq): + if freq is "always": return False semfile = self.sem_getpath(name,freq) if os.path.exists(semfile): return True @@ -177,7 +178,7 @@ class EC2Init: if e.errno != errno.EEXIST: raise e - if os.path.exists(semfile): + if os.path.exists(semfile) and freq is not "always": return False # race condition |