help-cfengine
[Top][All Lists]
Advanced

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

RE: Executing a file only on later passes


From: Wheeler, John
Subject: RE: Executing a file only on later passes
Date: Mon, 3 Nov 2003 09:05:48 -0600

Please help me understand its usefulness. I've been unable to figure out
what it's needed for. Does someone have an example of how this feature
is used? Is there something in the docs I've missed indicating how this
can be utilized? Why 2 passes? Seems arbitrary (an uniformed
assumption).

I'd love to have a reason to keep it in (I've got to patch my rpms now),
more importantly, actually use it, but for me it just clutters things.

> -----Original Message-----
> From: Mark Burgess [mailto:address@hidden
> Sent: Monday, November 03, 2003 3:18 AM
> To: Wheeler, John
> Cc: address@hidden
> Subject: Re: Executing a file only on later passes
> 
> 
> Please do not mess with this. If you don't understand things leave
them
> alone. The second pass is for resolving secondary dependencies and
> is automatic.
> 
> M
> 
> On 24 Oct, Wheeler, John wrote:
> > If you don't actually use the 2nd pass (honestly I haven't found a
> > single use for this, I'd be interested to see if anyone has) you
could
> > recompile the code to just have a single pass. I've done this and it
> > makes writing and debugging automation much simpler.
> >
> > openlog(VPREFIX,LOG_PID|LOG_NOWAIT|LOG_ODELAY,LOG_USER);
> >
> > CheckSystemVariables();
> >
> > SetReferenceTime(false); /* Reset */
> >
> > DoTree(1,"Main Tree");
> > /* DoTree(2,"Main Tree"); */
> > DoAlerts();
> >
> > SummarizeObjects();
> >
> > closelog();
> > return 0;
> > }
> > "cfagent.c" line 195 of 1948 --10%-- col 1
> >
> >
> >
> > I made this modification in 2.0.6.
> >
> >
> >
> >> -----Original Message-----
> >> From: Chip Seraphine [mailto:address@hidden
> >> Sent: Friday, October 24, 2003 2:36 PM
> >> To: cfengine
> >> Subject: Executing a file only on later passes
> >>
> >>
> >> I have a file called cf.finish that performs some cleanup and
> >> notification tasks that I only want done absolutely dead last, so
> >> that all the other actions have a chance to set various classes.
It
> >> is imported last from cfagent.conf.
> >>
> >> Unfortunately, -d2 output shows that it executes before the second
> > pass
> >> is performed for many of the other imported files.  This causes
> >> cf.finish to miss a lot of things it needs to be able to see.
> >>
> >> I don't see any kind of 'pass1' or 'pass2' hardclasses being set
> > (which
> >> makes sense, as cfengine doesn't like to unset classes, making a
> >> 'pass flag' class unwieldy).  So how should I do this?  What method
> >>will safely guarantee that the contents of an imported file will
only
> > execute
> >> on the second pass?
> >>
> >> Thanks,
> >>
> >> -c
> >>
> >> "I had a falling out with God.  I wanted the Cubs to win the World
> >> Series and he wanted them to continue to suck." - Andy Richter
> >>
> >>
> >>
> >> _______________________________________________
> >> Help-cfengine mailing list
> >> address@hidden
> >> http://mail.gnu.org/mailman/listinfo/help-cfengine
> >
> >
> > _______________________________________________
> > Help-cfengine mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/help-cfengine
> 
> --
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272            Email:  address@hidden
> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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