You want a commands promise that is a "module". See http://www.cfengine.org/manuals/cf3-reference.html#module-in-commands. You can't exactly inherit shell variables, but this is pretty close to what you said you need, and probably what you really want.
-Dan On Dec 28, 2010, at 10:05 AM, [email protected] wrote: > Forum: Cfengine Help > Subject: Inherit shell variables in "commands:" > Author: berntjernberg > Link to topic: https://cfengine.com/forum/read.php?3,19964,19964#msg-19964 > > Hi all, > > I need to assign 10 variables in shell before I run a script. How can I > inherit shell variables in a commands-section? > I have tried to create a file, containing exports of variables, run it > followed by a commands section on the same line > but it didn't work: > > Like this: > > commands: > "/tmp/filewithvars && $(script)"; > > Any ideas? > > Regards > /Bernt Jernberg > > _______________________________________________ > Help-cfengine mailing list > [email protected] > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
