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 ( shellcommands.foo shellcommands.bar ), 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 "shellcommands.foo", 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 _______________________________________________ Help-cfengine mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-cfengine
