From e9042188ccbf14973a7abb4038bfbb4a8086763e Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 29 Jan 2008 17:30:26 +0000 Subject: 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 --- src/lib/Server/Plugins/Cfg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-1-g7c22