help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug with parentheses


From: Mark . Burgess
Subject: Re: bug with parentheses
Date: Tue, 31 Aug 2004 15:29:02 +0200 (MEST)

This is documented.

M


On 31 Aug, Sebastien Begue wrote:
> Hi,
> 
> With cfengine 2.1.10
> 
> i've got a problem with a shellcommand class
> 
> Configuration :
> OUT                   = ( "/usr/bin/test $(VAR1) = OUT -o $(VAR2) = OUT 
> -o $(VAR3) = OUT -o $(VAR3) = OUT" )
> 
> Debug :
> Expansion gave (/usr/bin/test VAL1 = OUT -o VAL2 = OUT -o VAL3 = OUT -o 
> VAL4)
> cfpopen(/usr/bin/test VAL1 = OUT -o VAL2 = OUT -o VAL3 = OUT -o VAL4 = OUT)
> 
> And the output at execution :
> cfagent.conf:<line number>: Variables in function with $() rather than 
> ${} - bug workaround
> 
> Before upgrade on 2.1.10, the 2.1.5 don't generate this problem.
> 
> Then i've change the construction of my classe with :
> OUT                   = ( "/usr/bin/test ${VAR1} = OUT -o ${VAR2} = OUT 
> -o ${VAR3} = OUT -o ${VAR3} = OUT" )
> Now there is no problem at execution of cfagent...
> 
> Why there is a such behavior ?
> 
> In the documentation (tutorial) it says :
> "Variables are referred to in either of two different ways, depending on 
> your taste. You can use the forms $(variable) or ${variable}. The 
> variable in braces or parentheses can be the name of any user defined 
> macro, environment variable or one of the following special internal 
> variables."
> 
> ...
> 
> Sébastien
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]