bug-cfengine
[Top][All Lists]
Advanced

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

Re: a bug in module variable processing?


From: Mark Burgess
Subject: Re: a bug in module variable processing?
Date: Sun, 6 Feb 2005 17:03:02 +0100
User-agent: Internet Messaging Program (IMP) 3.2.2

We can call this a bug for now. It is something that is not easily
solved at this stage,

M

> 
>     Ok, while working with my own module, I ran across a bug.
> 
>     my module returns a list, which I was planning on iterating over in 
> a shellcommand: -- but the variable returned from the module is not 
> being processed like the ones defined in the control: section.
> 
>      I've distilled the problem down to a small set of test files, and 
> the problem persists (I've tested it in 2.1.12)
> 
>     my simplified module returns a string "one:two:three"  -- the 
> control: section has a similar variable which consists of 
> "ten:nine:eight"
> 
>     The results:
> 
> > wombat $ /apps/cfengine/bin/cfagent -K --file `pwd`/cf.test123
> > cfengine::/bin/echo itera: iterate module:onetwothree one:two:three
> > cfengine::/bin/echo itera: iterate internal ten
> > cfengine::/bin/echo itera: iterate internal nine
> > cfengine::/bin/echo itera: iterate internal eight
> 
>     my cfagent script cf.test123 is:
> 
> > wombat $ cat cf.test123
> >
> > control:
> >
> >   actionsequence =
> >   (
> >     module:onetwothree
> >     shellcommands
> >   )
> >
> >   MYLIST        = ( ten:nine:eight )
> >
> > shellcommands:
> >
> >
> >    any::
> >         "/bin/echo iterate module:onetwothree $(MYONETWO)"
> >         "/bin/echo iterate internal $(MYLIST)"
> >
> >
> > #end cf.test123
> 
> 
>     a simplified module:
> 
> > wombat $  cat ~/.cfagent/modules/module:onetwothree
> > #!/bin/sh
> > #
> > #
> > echo "=MYONETWO=one:two:three"
> >
> 
>       I would assume the variable "MYONETWO" *should* iterate, just like 
> "MYLIST"
> 
>     right?
> 
>           --erik
> 
> 
> 
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-cfengine
> 


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


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




reply via email to

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