From 511448c7afdcb5aaeb69a26e570fd600df512610 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 29 Jan 2010 10:09:25 -0500 Subject: make disable-ec2-metadata persistent across boots The sem_and_run and such needs some work, donesn't make a lot of sense for "always". --- ec2init/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ec2init/__init__.py') 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 -- cgit v1.2.3