help-cfengine
[Top][All Lists]
Advanced

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

wishlist item


From: Akop Pogosian
Subject: wishlist item
Date: Fri, 23 May 2003 18:01:35 -0700
User-agent: Mutt/1.4i

I am finding myself running into this limitation pretty often. The
classes that get defined by custom modules are defined only after
cfengine has parsed the groups section of the configuration file.
Because of this, it is not possible to derive new classes from
compound classes some of which might have been defined by the modules.
I need such classes to be defined because some scripts that I call
from cfengine depend on such classes being defined because these
scripts don't have their own logic to combine cfengine classes.

For example, I would like to define a class ipf_3_4_31_64_bit only if
class 64_bit is defined. Since I am using a module script to set/unset
classes 32_bit/64_bit, I am unable to put something like this in the
group file:

ipf_3_4_31_64_bit = ( 64_bit.clients )

I used to work around this limitation by adding
"shellcommands.classdefs" in action sequence right after executing all
modules. The shellcommands section would look like this:

shellcommands:
        classdefs.clients.64_bit::
                "/bin/true"
                define=ipf_3_4_31_64_bit

However, this stopped working when I tried to define more than one
class this way because cfengine thinks that not enough time has
elapsed since "/bin/true" has been executed the first time. I found a
workaround for this by using "/bin/true a", "/bin/true b", etc.
However, this looks like a kludge to me. It seems to be that it would
be useful to be able to tell cfengine whether to run certain modules
before or after groups section has been parsed (but certainly, in any
case, they need to run after commands from update.conf have been
executed to give the update.conf the opportunity to get a fresh copy
of script modules before they get to run).

-akop




reply via email to

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