diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-10-08 16:09:44 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-10-08 16:09:44 +0000 |
commit | 72535d3efff15dcc454a3db548bca9ea4e35a6f8 (patch) | |
tree | 6f53768a1f881dac51215a5ca974a6366f4b6638 /src/lib/Client/Tools/POSIX.py | |
parent | 416a4889a9c97140027349bb7a722be228807515 (diff) | |
download | bcfg2-72535d3efff15dcc454a3db548bca9ea4e35a6f8.tar.gz bcfg2-72535d3efff15dcc454a3db548bca9ea4e35a6f8.tar.bz2 bcfg2-72535d3efff15dcc454a3db548bca9ea4e35a6f8.zip |
* Implement a cleaner fix for the empty config file install check
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2408 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/POSIX.py')
-rw-r--r-- | src/lib/Client/Tools/POSIX.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index ce609848d..47ccb8e56 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -32,6 +32,16 @@ class POSIX(Bcfg2.Client.Tools.Tool): 'Permissions': ['name', 'owner', 'group', 'perms'], 'SymLink': ['name', 'to']} + def canInstall(self, entry): + '''Check if entry is complete for installation''' + if Bcfg2.Client.Tools.Tool.canInstall(self, entry): + if (entry.tag, entry.text, entry.get('empty', 'false')) == \ + ('ConfigFile', None, 'false'): + return False + return True + else: + return False + def VerifySymLink(self, entry, _): '''Verify SymLink Entry''' try: @@ -190,9 +200,6 @@ class POSIX(Bcfg2.Client.Tools.Tool): def InstallConfigFile(self, entry): '''Install ConfigFile Entry''' - if entry.text == None and entry.get('empty', 'false') != 'true': - self.logger.info("Incomplete information for ConfigFile %s" % entry.get('name')) - return False self.logger.info("Installing ConfigFile %s" % (entry.get('name'))) parent = "/".join(entry.get('name').split('/')[:-1]) |