diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-01-29 17:30:26 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-01-29 17:30:26 +0000 |
commit | e9042188ccbf14973a7abb4038bfbb4a8086763e (patch) | |
tree | e99471f971c7ec36f9dfec31931a7c278ac408b9 /src/lib/Server | |
parent | 9c7631f4c566a313aa61bbc67c3f1544ad2a4dcc (diff) | |
download | bcfg2-e9042188ccbf14973a7abb4038bfbb4a8086763e.tar.gz bcfg2-e9042188ccbf14973a7abb4038bfbb4a8086763e.tar.bz2 bcfg2-e9042188ccbf14973a7abb4038bfbb4a8086763e.zip |
Fix bcfg2-admin pull for host-specific files when the current data is group-specific [bugfix]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4305 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index 11689f644..7033945c2 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -434,9 +434,9 @@ class Cfg(Bcfg2.Server.Plugin.Plugin): if ".H_%s" % (meta.hostname) in basefile.name: raise SystemExit, 1 # figure out host-specific filename - if '.G_' in basefile.name: - idx = basefile.name.find(".G_") - newname = basefile.name[:idx] + ".H_%s" % (meta.hostname) + reg = re.compile("(.*)\.G\d+.*") + if reg.match(basefile.name): + newname = reg.match(basefile.name).group(1) + ".H_%s" % (meta.hostname) else: newname = basefile.name + ".H_%s" % (meta.hostname) print "This file will be installed as file %s" % newname |