bug-cfengine
[Top][All Lists]
Advanced

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

a bug in module variable processing?


From: erik seielstad
Subject: a bug in module variable processing?
Date: Fri, 4 Feb 2005 23:07:53 -0500


   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





reply via email to

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