From 421b10ebfb679a0461eb9f593a9b22bc390b19b1 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Tue, 6 Oct 2009 22:28:17 +0000 Subject: 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 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5475 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Cfg.py | 6 ++++-- 1 file 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) -- cgit v1.2.3-1-g7c22