3.3 Undefined variables
Note that macro-variables which are undefined are not expanded as of version
1.6 of cfengine. In earlier versions, undefined variables would be replaced
by an empty string, as in Perl. In versions 1.6.x and later, the variable string
remains un-substituted, if the varaiable does not exist. For instance,
actionsequence = ( shellcommands )
myvar = ( "test string " )
"/bin/echo $(myvar) $(myvar2)"
cfengine:host: Executing script /bin/echo test string $(myvar2)
cfengine:host:/bin/echo test : sh: syntax error at line 1: `(' unexpected
cfengine:host: Finished script /bin/echo test string $(myvar2)
This allows variables to be defined on-the-fly by modules.