help-cfengine
[Top][All Lists]
Advanced

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

actionsequence suggestion


From: Ed Brown
Subject: actionsequence suggestion
Date: Thu, 06 Jan 2005 10:53:38 -0700

The limitations imposed by the present actionsequence definition format
is a frequent source of frustration when working with cfengine.  Very
often, you want finer control over individual instances of particular
actions, and having to define a qualified instance of the action is not
very scalable or flexible.  I'd like to suggest a different approach,
that could coexist with the current implementation, so as not to create
a backwards compatibility problem.

Borrowing from the scheme used for ordering startup/shutdown actions in
the rc.x directories, suppose that cfengine defined internal classes
00->99, that were used only to provide a sort order for actions.  So
that you could do something like this:

copy:
   25::
      /foo  dest=/foo ...
   60::
      /bar  dest=/bar ...
editfiles:
      { /foo AppendIfNoSuchLine "Hello" }
   70::
      { /foo AppendIfNoSuchLine "Hello" }

The numeric priority for actions without an explicit sequence specifier
default to 50, so the above results in:
copy foo, edit foo, copy bar, edit bar

The actionsequence for actions with the same priority would be
determined as it is now, in the 'control:' section definition, or, if no
actionsequnce is defined in 'control:', it could be left indeterminate
(like rc.x startup actions with the same number)

Any thoughts on this?

-Ed







reply via email to

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