Changeset 5475

Show
Ignore:
Timestamp:
10/06/09 17:28:17 (7 weeks ago)
Author:
solj
Message:

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@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/bcfg2/src/lib/Server/Plugins/Cfg.py

    r5119 r5475  
    5555class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet): 
    5656    def __init__(self, basename, path, entry_type, encoding): 
    57         Bcfg2.Server.Plugin.EntrySet.__init__(self, basename, path, entry_type, 
    58                                               encoding) 
     57        Bcfg2.Server.Plugin.EntrySet.__init__(self, basename, path, 
     58                                              entry_type, encoding) 
    5959        self.specific = CfgMatcher(path.split('/')[-1]) 
    6060 
     
    8080        basefile = used.pop(0) 
    8181        data = basefile.data 
     82        if entry.tag == 'Path': 
     83            entry.set('type', 'configfile') 
    8284        for delta in used: 
    8385            data = data.strip()