Node:Command line classes, Neste:actionsequence classes, Forrige:Defining classes, Opp:Defining classes
You can define classes of your own which can be switched on and off,
either on the command line or from the action sequence. For example,
suppose we define a class include. We use addclasses
to
do this.
addclasses = ( include othersymbols )
The purpose of this
would be to allow certain `excludable actions' to be defined.
Actions defined by
any.include:: actions
will normally be carried out, because we have defined include
to
be true using addclasses
. But if cfengine is run in a restricted
mode, in which include
is set to false, we can exclude these
actions.
So, by defining the symbol include
to be false, you can exclude
all of the actions which have include
as a member. There are two
ways in which this can be done, one is to negate a class globally using
cfengine -N include
This undefines the class include
for the entire duration of the
program.