[Top][All Lists]

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

Re: imports, classes and processes

From: Tim Nelson
Subject: Re: imports, classes and processes
Date: Thu, 2 Dec 2004 15:41:42 +1100 (EST)

On Wed, 1 Dec 2004, Gregory LeBaron wrote:

I'm trying to define classes in an external file as is done in the examples in the reference manual. It seems that clases that I define in the included file aren't defined when cfagent gets to the processes: section but if I define the class in the cfagent.conf it works.

For example:

cf.groups contains:
YP_Clients = ( ReturnsZero(/bin/sh -c "test -f /etc/rc.d/rc5.d/S*ypbind") )

cfagent.conf contains:
  "ypbind" restart "/etc/rc.d/init.d/ypbind start"

  "cupsd" restart "/etc/rc.d/init.d/cups start"

When I run cfagent -v I can see that YP_Clients is defined:
Defined Classes = ( 132_206_150 132_206_150_59 32_bit Day1 December Hr22 Hr22_Q3 LoadAvg_low_dev1 Math3 Math3_Math_McGill_CA Math_McGill_CA Min30_35 Min34 Q3 UserProcs_low_normal Wednesday YP_Clients

but when it gets to the processes section I'll see:

cfengine:lupin: Running process command /bin/ps auxw
Defining classes
Existing restart sequence found (/etc/rc.d/init.d/cups start)
cfengine:lupin: Matches found for cupsd - no restart sequence

But nothing  for YP_Clients

If I put the group definitions back into cfagent.conf, it works just fine.

This is 2.1.11 on Fedora Core 2.

Set cfagent.conf to:


Put the main part of your config in cf.main, and cf.groups will take effect.

The reason for this is that cfagent.conf is completely parsed before cf.groups, so it doesn't register. But cf.groups is parsed before cf.main


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: address@hidden

reply via email to

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