help-cfengine
[Top][All Lists]
Advanced

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

Re: cfagent segfaults during kickstart on FC4


From: Knut Auvor Grythe
Subject: Re: cfagent segfaults during kickstart on FC4
Date: Sat, 20 Aug 2005 00:57:35 +0200
User-agent: Mutt/1.5.6i

On Fri, Aug 19, 2005 at 03:45:42PM -0700, Klaus wrote:
> while [ ! -f /tmp/cfsuccess ]
> do
>     ( cfagent --define __CLASS__ --define __NAME__ --file
> /var/cfengine/inputs/cfsetup.conf && touch /tmp/cfsuccess ) &
>     sleep 60
>     killall cfagent
> done
> 
> 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.

Couldn't you just do something like this?

while ! cfagent --define __CLASS__ --define __NAME__ --file 
/var/cfengine/inputs/cfsetup.conf; do
    echo cfagent failed
done

Why put cfagent in the background, just to kill it later? Wouldn't this
potentially zap your cfagent before it was done every time, creating an
infinite loop? It would probably happen after some time, when you start
doing something that takes a long time on the initial run.

-- 
Knut Auvor Grythe
ITEA Systemdrift




reply via email to

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