help-cfengine
[Top][All Lists]
Advanced

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

Re: Defining classes in update.conf that are seen by cfagent.conf?


From: Eric Dorland
Subject: Re: Defining classes in update.conf that are seen by cfagent.conf?
Date: Fri, 01 Apr 2005 16:14:57 -0500

On Wed, 2005-03-30 at 15:02 -0500, Eric Dorland wrote:
> On Wed, 2005-03-30 at 18:32 +0200, Mark Burgess wrote:
> > On Wed, 2005-03-30 at 11:08 -0500, Eric Dorland wrote:
> > > On Tue, 2005-03-29 at 20:55 -0500, nathan r. hruby wrote:
> > > > On Wed, 30 Mar 2005, Tim Nelson wrote:
> > > > 
> > > > Huh.  Could you use SetState() to simply define a call that would carry
> > > > over?
> > > > 
> > > > http//www.cfengine.org/docs/cfengine-Anomalies.html#Persistent-alerts
> > > 
> > > How would I call SetState() in response to successful copy?
> > > 
> > > The file creating thing, although klugy, looks promising.
> > > 
> > > I've basically got a cf script that installs some firewall rules, and I
> > > only want to reload the firewall rules if the script has actually
> > > changed. So doing the copy within the script would be a bit too late,
> > > since the script is already loaded.
> > > 
> > 
> > copy:
> > 
> >   .... define=success
> > 
> > 
> > alerts:
> > 
> >  success::
> > 
> >    SetState...
> > 
> 
> Thanks again Mark! That did the trick. You genius is surpassed only by
> your beauty :P Ok, here comes the next question/problem. 

I spoke too soon. Alerts do not get evaluated in the update phase, only
in the main phase. So if I set a class in update.conf to trigger the
alert, it doesn't get run because the main phase has wiped out my
classes.

Perhaps alerts defined in update.conf should be run before the main
phase? This is the behaviour you seemed to imply from your example. 


-- 
Eric Dorland
eric.dorland@mcgill.ca
WSG
514.398-5023 ext. 09562





reply via email to

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