[EMAIL PROTECTED] src]# /var/cfengine/bin/cfenvd [EMAIL PROTECTED] src]# cat cf.pass3 control:
actionsequence = ( shellcommands processes ) processes: "cfenvd" signal=HUP define=shellsomething shellcommands: shellsomething:: "/bin/echo true" [EMAIL PROTECTED] src]# ./cfagent -f ./cf.pass3 -I -K cfengine:hsysnav02: Signalled process 19180 (cfenvd) with SIGHUP cfengine:hsysnav02: Executing script /bin/echo true...(timeout=0,uid=-1,gid=-1) cfengine:hsysnav02:/bin/echo true: true cfengine:hsysnav02: Finished script /bin/echo true It should just make the class "shellsomething" installable. Then it will pick it up on a second pass. I tested it with the lastest 2.1.19-snap and 2.1.15. here is the verbose output ********************************************************************* Main Tree Sched: shellcommands pass 1 @ Thu Feb 23 10:05:47 2006 ********************************************************************* ********************************************************************* Main Tree Sched: processes pass 1 @ Thu Feb 23 10:05:47 2006 ********************************************************************* cfengine:: Running process command /bin/ps auxw cfengine:: Signalled process 19715 (cfenvd) with SIGHUP Defining classes shellsomething DoSignals(cfenvd) ********************************************************************* Main Tree Sched: shellcommands pass 2 @ Thu Feb 23 10:05:47 2006 ********************************************************************* cfengine:: Executing script /bin/echo true...(timeout=0,uid=-1,gid=-1) (Setting umask to 77) cfengine::/bin/echo true: true cfengine:: Finished script /bin/echo true On 2/14/06, Brian E. Seppanen <[EMAIL PROTECTED]> wrote: > I have my actionsequence as > > actionsequence = ( shellcommands processes ) > > I am loath to modify that order because sometimes a shellcommand is going > to trigger a process restart. > > I have enountered a situation though where I want to do a process check to > see if a specific process is running > > such as > > processes: > debian:: > "rpc.statd" signal=term define=servicesremove > "portmap" signal=term define=servicesremove > > > servicesremove.shellcommands: > debian:: > "/usr/bin/env PATH=/sbin:/usr/sbin:/bin/:/usr/bin:/usr/local/bin > /usr/sbin/update-rc.d -f nfs-common remove" > "/usr/bin/env PATH=/sbin:/usr/sbin:/bin/:/usr/bin:/usr/local/bin > /usr/sbin/update-rc.d -f nfs-kernel remove" > "/usr/bin/env PATH=/sbin:/usr/sbin:/bin/:/usr/bin:/usr/local/bin > /usr/sbin/update-rc.d -f portmap remove" > > > How do I trigger this action to occur only if the identified process is > matched? The servicesremove is being activiated even if the process is > not running and is occurring every time. > > > BTW: Anyone running a later cfengine version 2.1.17, 2.1.18 successfully > on linux sparc64? > > > Thanks, > > > Brian Seppanen > 608.826.1464 > > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@gnu.org > http://lists.gnu.org/mailman/listinfo/help-cfengine > -- Christian Pearce _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine