[Top][All Lists]

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

Re: run cfengine with params

From: Will Lowe
Subject: Re: run cfengine with params
Date: Thu, 11 Nov 2004 11:39:11 -0800
User-agent: Mutt/1.5.6+20040722i

I do this with environment variables.  The cron job that runs cfengine
looks like this:

30 * * * *     root  RUNNING_FROM_CRON=YES /usr/sbin/cfexecd -F

And then in the configs I have:


    splay      = ( IsDefined(RUNNING_FROM_CRON) )

        SplayTime = ( 55 )

... so when it's run by hand, RUNNING_FROM_CRON is unset, the "splay"
class isn't defined, and no splaying happens.

On Tue, Nov 09, 2004 at 01:43:39PM -0500, Dave Stern wrote:
> We would like cfengine to run in two different formats yet use the same 
> config file. Is this possible?
> Specifically, I'd like an interactive script to use a different value 
> for SplayTime which is defined in control in the config file.
> Ideally, I'd like a command line parameter like:
> cfengine -f ... -DsPlayTime=1
>    for interactive   and
> cfengine -f ... -Dsplaytime=60
>    for cron
> But if this can only be done by defining a class from the command line 
> and having some class stanza that changes splaytime, that would be ok 
> too (just work coding to set). If so, could someone show an example?
> _______________________________________________
> Help-cfengine mailing list
> address@hidden


reply via email to

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