[Top][All Lists]

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

Re: cfagent segfaults during kickstart on FC4

From: Eric Sorenson
Subject: Re: cfagent segfaults during kickstart on FC4
Date: Fri, 19 Aug 2005 16:14:30 -0700 (PDT)

On Fri, 19 Aug 2005, Klaus wrote:

> Is there a way to extract a PID out of cfengine while it runs? That
> would make the kind of code loop used above less dodgy.

we do something similar in our startup script (though I cannot claim credit 
for this bash bashing). note success() and failure() are redhat-isms 

        # manual callout for cfagent; let it only run for upto 2min
        echo -n "cfagent execute: "
        /usr/sbin/cfagent -q > /dev/null 2>&1 &
        RETVAL=$?; subpid=$!
        if [ $RETVAL -eq 0 ]; then
            while kill -n 0 $subpid 2> /dev/null; do
                if [ "$maxtime" -lt 1 ]; then
                    kill -n 9 $subpid 2> /dev/null
                    failure "cfagent boot timeout"
                sleep 1
            kill -n 0 $subpid 2> /dev/null || [ "$maxtime" -gt 0 ] && \
                                        success "cfagent boottime execute"

The assumption is that a reasonable cfengine run will never take two minutes
to complete.

 - Eric Sorenson - N37 17.255 W121 55.738 - -
 - Personal colo with a professional touch - -

reply via email to

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