On Wed, 19 Apr 2006, Ed Brown wrote:

Here is an excerpt from an exchange last year about this:
-----------------------
On Wed, 2005-01-05 at 06:34, Christian Pearce wrote:
cfagent.conf
    control:
      actionsequence = ( copy shellcommands shellcommands.secondrun )

In my experience, if you qualify any action, you had better qualify them
all.  The above is misleading in that if you move the unqualified
'shellcommands' after 'shellcommands.secondrun' it does not change the
actionsequence. In other words, this does not work:

actionsequence = ( shellcommands.firstrun shellcommands )
-----------------------

So, you CAN get away with using an unqualified actionsequence item before, but not after, a qualified instance. The unqualified actions will run at the same time in the sequence as the qualified ones (and not again later, because of locking - you should be able to verify this in the output, no?)

-Ed


I don't follow that because with

actionsequence = ( processes.pre shellcommands processes )

is appropriately executing in the order that I want. However, a defined class from the processes action is not being evaluated correctly within the shellcommands stanza.



actionsequence = ( processes.pre copy directories links files editfiles packages tidy shellcommands processes )
    AddInstallables = ( "servicesremove" )


shellcommands:
    servicesremove::
"/usr/bin/env PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin /usr/sbin/update-rc.d -f atd remove"


processes:
        pre.debian::
                "atd" action=warn matches>0 define=servicesremove

        debian.!pre::
                "atd" signal=term


I get the following output
*********************************************************************
 Main Tree Sched: processes.pre pass 1 @ Wed Apr 19 11:51:41 2006
*********************************************************************


                  New temporary class additions
                  --------( Pass 1 )-------
                             pre
cfengine:sibelius: Running process command /bin/ps auxw
cfengine:sibelius: Process alert: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cfengine:sibelius: Process alert: daemon 13436 0.0 0.1 1764 632 ? Ss 11:51 0:00 /usr/sbin/atd
Defining classes servicesremove
DoSignals(atd)

*********************************************************************
 Main Tree Sched: shellcommands pass 1 @ Wed Apr 19 11:51:41 2006
*********************************************************************


*********************************************************************
 Main Tree Sched: processes pass 1 @ Wed Apr 19 11:51:41 2006
*********************************************************************

cfengine:sibelius: Running process command /bin/ps auxw
cfengine:sibelius: Signalled process 13436 (atd) with SIGTERM
cfengine:sibelius: Killed: daemon 13436 0.0 0.1 1764 632 ? Ss 11:51 0:00 /usr/sbin/atd
Defining classes
DoSignals(atd)
---------------------------------------------------------------------



Brian Seppanen
608.826.1464
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to