Re: Iterator troubles under version 2.2.3-5.fc8

"Daryl Grunau" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
Same behavior on 2.2.8 F9.  I copied the example code on p. 139 of the
cfengine reference:

 # cat cf.newtest
control:
        actionsequence = ( shellcommands )
        var1 = ( a:b:c )
        var2 = ( x:y:z )

shellcommands:
        "/bin/echo $(var1) $(var2)"

Running this file yields
# ./usr/sbin/cfagent -qxK --file ./cf.newtest
cfengine:asds:/bin/echo a x: a x
cfengine:asds:/bin/echo a y: a y
cfengine:asds:/bin/echo a z: a z

$(var1) is not getting iterated over.  Is this the expected behavior?

Daryl



On Thu, Sep 4, 2008 at 12:50 PM, Daryl W. Grunau <[email protected]> wrote:
> Hi, I noticed a bit of different behavior w.r.t iterators between an older
> version of cfengine (2.1.22) and a recent version in F8.  Given the
> following input file:
>
>   # cat cf.test
>   control:
>           any::
>                   actionsequence  = ( shellcommands )
>                   iterator1       = ( a:b )
>                   iterator2       = ( y:z )
>
>   shellcommands:
>
>           any::
>                   "/bin/bash -c '/bin/echo $1 $2' $(iterator1) $(iterator2)"
>
> I get the following different behavior:
>
> ############## 2.2.3 ##############
>
> # cfagent -vqxK --file ./cf.test
> Reference time set to Thu Sep  4 12:44:02 2008
>
> GNU Configuration Engine -
> 2.2.3
>
> [[ snip ]]
>
> cfengine:cuda:
> Executing script /bin/bash -c '/bin/echo $1 $2' a y...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: y
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' a y
> Performance(Exec(/bin/bash -c '/bin/echo $1 $2' a y)): time=0.0044 secs, av=0.0043 +/- 0.0065
> cfengine:cuda:
> Executing script /bin/bash -c '/bin/echo $1 $2' a z...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: z
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' a z
> Performance(Exec(/bin/bash -c '/bin/echo $1 $2' a z)): time=0.0042 secs, av=0.0042 +/- 0.0065
>
>
> ############## 2.1.22 ##############
>
> # ./usr/sbin/cfagent -vqxK --file ./cf.test
> Setting cfengine new port to 48148
> Setting cfengine old port to 5308
> Reference time set to Thu Sep  4 12:46:43 2008
>
> GNU Configuration Engine -
> 2.1.22
>
> [[ snip ]]
>
> cfengine:cuda: Executing script /bin/bash -c '/bin/echo $1 $2' a y...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: y
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' a y
> cfengine:cuda: Executing script /bin/bash -c '/bin/echo $1 $2' a z...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: z
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' a z
> cfengine:cuda: Executing script /bin/bash -c '/bin/echo $1 $2' b y...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: y
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' b y
> cfengine:cuda: Executing script /bin/bash -c '/bin/echo $1 $2' b z...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> cfengine:cuda:/bin/bash -c '/: z
> cfengine:cuda: Finished script /bin/bash -c '/bin/echo $1 $2' b z
>
>
> Any help with this problem appreciated!
>
> Daryl
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.