Thanks Andy Clayton wrote: > Currently when using a shellcommand with a define set, trying to use > $(allclasses) in the argument list expands incorrectly to what the > define option is set to. > > Example config: > > shellcommands: > "/var/cfengine/scripts/packages.sh $(allclasses)" > define=script_success > > What runs: > > /var/cfengine/scripts/packages.sh script_success > > Expected: > > /var/cfengine/scripts/packages.sh CFALLCLASSES=class1:class2:class3:... > > This happens because the ALLCLASSBUFFER is currently being used for two > purposes. One is to hold the string representation of the class stack > that replaces $(allclasses), and the other is to temporarily hold the > define option while parsing. > > The supplied patch (against 2.2.10) adds a new DEFINECLASSBUFFER (to > match the ELSECLASSBUFFER), and uses that instead for holding the define > option. Note that we need to still zero out the ALLCLASSBUFFER in the > action initialization because $(allclasses) currently cannot be expanded > when first parsed. If it is we run into problems with > Build2DListFromVarstring splitting on the colons in the class string. > > Overall the changes are fairly minimal as ALLCLASSBUFFER is not > referenced in tons of places. > > Thanks, > > Andy Clayton > > > ------------------------------------------------------------------------ > > _______________________________________________ > Bug-cfengine mailing list > Bug-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/bug-cfengine
-- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Bug-cfengine mailing list Bug-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/bug-cfengine