[Top][All Lists]

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

Re: Possible bug: parsing/scheduling of editfiles sections in multiple c

From: Knut Auvor Grythe
Subject: Re: Possible bug: parsing/scheduling of editfiles sections in multiple cfengine scripts
Date: Mon, 12 Sep 2005 22:16:31 +0200
User-agent: Mutt/1.5.9i

On Mon, Sep 12, 2005 at 12:09:19PM -0600, Ed Brown wrote:
> I appreciate your effort to clarify the algorithms involved in
> actionsequence scheduling, but even the algorithms don't explain the
> actual behavior very fully. 

It's actually quite simple. When you add "shellcommands.pre" to your
actionsequence, it means that "pre" is going to be defined when the
shellcommands sequence is run. This means that you need to test for
"pre" to know whether you are in that particular run of shellcommands or
not. It behaves exactly like any other class.

So what you need to do is have a proper way of checking what
shellcommands run you are in. If you have the actionsequence 
( ), you need to test for foo and
bar to know which run you are in. If you don't test for them, then the
command will run both times. This makes sense, because you are basically
saying "i don't care when it runs".

If you have both a simple "shellcommands" and for instance
"", the commands meant to run in "shellcommands" and
_not_ in foo need to test for !foo, since that is the only way of
knowing. Needless to say, this is a bit cumbersome, so as you say it is
best to qualify all if you qualify any.

I fail to see the problem with this. To me it makes perfect sense, and I
see no reason to want to change it. Actually, changing it would probably
just make it illogical and difficult.

Knut Auvor Grythe
ITEA Systemdrift

reply via email to

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