diff --git a/tsshbatch.py b/tsshbatch.py index 7458ff0..a4c4e8a 100755 --- a/tsshbatch.py +++ b/tsshbatch.py @@ -20,7 +20,7 @@ CMDINCL = PROGENV + "CMDS" HOSTINCL = PROGENV + "HOSTS" -CVSID = "$Id: tsshbatch.py,v 1.192 2014/12/02 20:06:50 tundra Exp $" +CVSID = "$Id: tsshbatch.py,v 1.193 2014/12/02 20:46:41 tundra Exp $" VERSION = CVSID.split()[2] CPRT = "(c)" DATE = "2011-2014" @@ -317,14 +317,22 @@ for src in filelist: - # Resolve references to hostname in source file specification + # Process any .define substitions - srcfile = src.replace(HOSTNAME, HostName) - srcfile = src.replace(HOSTSHORT, HostShort) + srcfile = VarSub(src) + + # Process any HOSTNAME, HOSTSHORT substitutions + + srcfile = srcfile.replace(HOSTNAME, HostName) + srcfile = srcfile.replace(HOSTSHORT, HostShort) for destdir in filelist[src]: - # Resolve references to hostname in destination directory specification + # Process any .define substitutions + + destdir = VarSub(destdir) + + # Process any HOSTNAME, HOSTSHORT substitutions destdir = destdir.replace(HOSTNAME, HostName) destdir = destdir.replace(HOSTSHORT, HostShort)