help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cfenvd init script help


From: Anne Cross
Subject: cfenvd init script help
Date: Fri, 11 Feb 2005 16:33:55 -0500
User-agent: Mutt/1.4.2.1i

Right now, when I stop cfenvd on my solaris boxen, I get a core dump. 
I'm pretty sure this isn't supposed to happen, and I'm wondering if
there's an option I'm missing in my init script that would make it stop
without dumping core.  kill -HUP from the command line seems to produce 
the same output as the script.

I checked the documentation, but all I could find were references to
starting cfenvd, and my goal is to stop it cleanly when we reboot
machines.  Google doesn't give me any suggestions either, though I may 
not have given it the right search options.

        -- Anne

----------------- Current script -------------------
#!/bin/sh
#

CFINPUTS=/var/cfengine/inputs
export CFINPUTS
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/var/cfengine/bin
export PATH

ECHO=/bin/echo
Pid=`/bin/pgrep -d '' -x cfenvd`

if [ -f /usr/local/sbin/cfenvd ]
then
        case $1 in
        start)
                if [ "X$Pid" = "X" ]
                then
                        /usr/local/sbin/cfenvd
                else
                        echo "cfenvd may already be running."
                fi
        exit 0
        ;;

        stop)
                if [ "X$Pid" != "X" ]
                then
                        pkill cfenvd
                fi
                ;;
        *)
                echo "usage: $0 {start|stop}"
                ;;
        esac
fi


                                                                                
Anne Cross
Systems Administrator, Tufts University
"They just tend to lunge at whatever looks interesting to them, write 
 whatever they please, and let the chips fall where they may. So we
 may seem not merely arrogant, but completely unhinged." -- Neal Stephenson 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]