summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-10-06 22:28:17 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-10-06 22:28:17 +0000
commit421b10ebfb679a0461eb9f593a9b22bc390b19b1 (patch)
tree0064a908580cf23c59e90f1c5c74233d84cabd26
parent0d2e433555ffb7058bda65e92cf95b36f4368442 (diff)
downloadbcfg2-421b10ebfb679a0461eb9f593a9b22bc390b19b1.tar.gz
bcfg2-421b10ebfb679a0461eb9f593a9b22bc390b19b1.tar.bz2
bcfg2-421b10ebfb679a0461eb9f593a9b22bc390b19b1.zip
Cfg: Set type to 'configfile' for Path entries
When binding Path entries using Cfg, we need to set the entry type to 'configfile' so that the POSIXCompat plugin can properly map it to an old-style entry. Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5475 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Cfg.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index d6da592b0..d26012205 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -54,8 +54,8 @@ class CfgMatcher:
class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
def __init__(self, basename, path, entry_type, encoding):
- Bcfg2.Server.Plugin.EntrySet.__init__(self, basename, path, entry_type,
- encoding)
+ Bcfg2.Server.Plugin.EntrySet.__init__(self, basename, path,
+ entry_type, encoding)
self.specific = CfgMatcher(path.split('/')[-1])
def sort_by_specific(self, one, other):
@@ -79,6 +79,8 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
used = self.get_pertinent_entries(metadata)
basefile = used.pop(0)
data = basefile.data
+ if entry.tag == 'Path':
+ entry.set('type', 'configfile')
for delta in used:
data = data.strip()
data = process_delta(data, delta)