On Wed, 20 Apr 2005, Dustin Sorge wrote:
I am trying to import a file called cf.groups which contains all of my group class definitions. I am also importing a cf.main file (which imports fine). When I put the groups block in the cfagent.conf file it finds the class properly and works:
########################################################################## # BEGIN PARSING /var/cfengine/inputs/cfagent.conf ##########################################################################
HandleClass(any) Found 0 variables in (cf.main) ExpandVarstring(cf.main) Appending [cf.main] ExpandVarstring(dell0) AddClassToHeap(advsys_node) Appending [advsys_node] HandleClass(advsys_node) .... ....
When I setup my cfagent.conf to look like this:
import: any:: cf.main cf.groups
Not sure what you're trying to achieve here, but try this:
import: any:: cf.groups cf.main
.... ....
It doesn't seem to work: ########################################################################## # BEGIN PARSING /var/cfengine/inputs/cfagent.conf ##########################################################################
HandleClass(any) Found 0 variables in (cf.main) ExpandVarstring(cf.main) Appending [cf.main] Found 0 variables in (cf.groups) ExpandVarstring(cf.groups) Appending [cf.groups] HandleClass(advsys_node) .... ....
any suggestions would be very helpful.
What's the "it" that you expect to see working?
Btw, the problems people usually have with "import" can usually be resolved by reading the "import" section of the cfengine reference, especially the bit which reads "Note that, if you define variables in an imported file they will not be defined for operations in their parent files. This because cfengine reads in all the import files after the main file has been parsed\u2014not at the place where you call import in your script. This means that variables or macros defined in imported files are only defined after the main program. Variables from earlier files are inherited by later includes, but not vice-versa."
:)
--
Tim Nelson
Server Administrator
WebAlive Technologies Global
Level 1 Innovation Building, Digital Harbour
1010 LaTrobe Street
Docklands, Melbourne, Vic, 3008
Phone: +61 3 9934 0812
Fax: +61 3 9934 0899
E-mail: [EMAIL PROTECTED]
http://www.webalive.biz/
"Your Business, Your Web, Your Control"
_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine