[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Order of Operations and Defining 2nd Run
From: |
David E. Nelson |
Subject: |
Re: Order of Operations and Defining 2nd Run |
Date: |
Tue, 14 Feb 2006 18:56:22 -0600 (CST) |
Hi Brian,
How about something like this. Regarding your actionsequence, how about
'actionsequence = ( processes.pre shellcommands processes.post )'. I'm not
familiar w/ Debian start/stop scripts so I'm showing solaris versions to get
the point across.
processes:
pre.solaris::
"lpsched$" # Systems do not run print services
matches=0 # Do nothing if we match this number.
action=bymatch
define=solaris_lpsched_stop
post.solaris::
<whatever else>
shellcommands:
solaris_lpsched_stop::
"/etc/init.d/lp stop ; rm /etc/rc2.d/S*lp"
Regards,
/\/elson
On Tue, 14 Feb 2006, Brian E. Seppanen 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
--
~~ ** ~~ If you don't think too well, then don't think too much. ~~ ** ~~