|
From: | Predrag Zecevic - Solaris System Administrator |
Subject: | Re: cfengine-die help... |
Date: | Wed, 15 Sep 2004 08:58:57 +0200 |
User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.2) Gecko/20040817 |
Have you tried w/o echo command? Did you tried to debug it? Regards ;-) Christian Pearce wrote:
I mistakenly put that before. I want the shutdown to go into the background. If I did && it would wait for shutdown to finish then it would echo "cfengine-die". Which leaves me where I was before. I think the shell command is correct. I am puzzled as to why shutdown getskilled. hmm maybe nohup doesn't block the SIGALRM. Only the SIGHUP. Maybe we need to change this behavior in cfengine. Considering wearen't using the alarm timer for anything other than 0. Which is immediate. This way we could block the hup with a nohup. Unless I am misunderstanding this. On Tue, 2004-09-14 at 11:03, Predrag Zecevic - Solaris System Administrator wrote:Hi Christian,you are missing one '&' in command bellow: shouldn't this look like: ... && echo "cfengine-die" ?Regards ;-) Christian Pearce wrote:# Reboot if scheduled automation occurs reboot:: '$(nohup) $(shutdown) -y -g 300 -i 6 "SysNav is rebooting the server to install patch Cluster(s)." & echo "cfengine-die"' background=true useshell=true Can someone explain to me the process under which cfengine kills a forked script? This is the last statement I tried. I call shutdown with nohup, but that doesn't seem to keep cfengine from killing it after I echo the cfengine die. Unfortunately if I don't use cfengine-die cfengine will not continue executing. I assume this is the code that does itif (ptr->timeout != 0){ alarm(0); signal(SIGALRM,SIG_DFL); } alarm(0) sets the seconds for the signal to be generated to zero. signal(SIGALRM, SIG_DFL) executes Terminate by default with the SIG_DFLhandle.But shutdown still gets killed off.
-- | Predrag Zecevic | e-Mail: Predrag.Zecevic@2e-Systems.COM | | 2e Systems GmbH | Tel: (+49)[0]6107 989 415 | |Im Taubengrund 12| Fax: (+49)[0]6107 989 494 | |65451 Kelsterbach| | | Germany | Cellular: (+49)[0]174 3109 288 | +=================+ The absurd is the essential concept and the first truth. -- A. Camus
[Prev in Thread] | Current Thread | [Next in Thread] |