help-cfengine
[Top][All Lists]
Advanced

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

Re: module macros are expanded too late - was Determining Solarispatch r


From: rader
Subject: Re: module macros are expanded too late - was Determining Solarispatch revisions
Date: Fri, 23 Sep 2005 15:26:20 -0500

 > So I tested again, with this:
 > 
 > control:
 >    addinstallable = ( sl3 )
 >    actionsequence = ( shellcommands )
 >  classes:
 >    bar = ( PrepModule(foo,"noargs") )
 >  import:
 >    sl3:: sl3.conf
 > 
 > where the module foo just prints '+sl3', and the shellcommand in
 > sl3.conf does indeed execute.  

Horrah!

 > Curious.  I can't imagine when you might use 'bar' (the class defined
 > based on the simple existence of the module), but I suppose if you only
 > copied the module foo to certain classes of machines, it could be
 > useful.
 > 
 > Still, it seems like Steve's example should work.

Sorry.  It's my fault.  My example works.  I just figured out the
"something obvious" I was missing: I hadn't matched the module
reference with the actual module name!  In other words, I had...

 classes:
   bogus = ( PrepModule(HasSL,"noargs") )

with the module script named/at

 /var/cfengine/modules/module:HasSL 

The correct config is...

 classes:
   bogus = ( PrepModule(HasSL,"noargs") )

with the module script named/at

 /var/cfengine/modules/HasSL

steve 
- - - 
systems & network manager
high energy physics
university of wisconsin





reply via email to

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