[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executing a file only on later passes
From: |
Mark Burgess |
Subject: |
Re: Executing a file only on later passes |
Date: |
Mon, 3 Nov 2003 10:18:16 +0100 (MET) |
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:chip@trdlnk.com]
>> 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
>> Help-cfengine@gnu.org
>> http://mail.gnu.org/mailman/listinfo/help-cfengine
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Re: Executing a file only on later passes,
Mark Burgess <=
- RE: Executing a file only on later passes, Wheeler, John, 2003/11/03
- Re: Executing a file only on later passes, Mark . Burgess, 2003/11/03
- Re: Executing a file only on later passes, Chip Seraphine, 2003/11/03
- Re: Executing a file only on later passes, Mark . Burgess, 2003/11/03
- Re: Executing a file only on later passes, Wipf, Stefan, 2003/11/03
- Re: Executing a file only on later passes, Mark . Burgess, 2003/11/03
- Re: Executing a file only on later passes, Wipf, Stefan, 2003/11/03
- Re: Executing a file only on later passes, Chip Seraphine, 2003/11/03
- Re: Executing a file only on later passes, Eric Sorenson, 2003/11/03
- Re: Executing a file only on later passes, Mark . Burgess, 2003/11/03