[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug with parentheses
From: |
Sebastien Begue |
Subject: |
bug with parentheses |
Date: |
Tue, 31 Aug 2004 14:50:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 |
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
- bug with parentheses,
Sebastien Begue <=