help-cfengine
[Top][All Lists]
Advanced

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

Re: [Cfengine] Re: cfexecd mail


From: Bas van der Vlies
Subject: Re: [Cfengine] Re: cfexecd mail
Date: Wed, 30 Jul 2003 12:06:05 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

Andrew Stribblehill wrote:

Quoting Bas van der Vlies <basv@sara.nl> (2003-07-30 10:34:53 BST):

Andrew Stribblehill wrote:


Quoting Bas van der Vlies <basv@sara.nl> (2003-07-29 14:49:53 BST):


Andrew Stribblehill wrote:


I was wondering ... wouldn't it be better if cfagent -z was an
interactive command which, when given a variable name would return
its value (possibly prefixed by the number of characters it was
sending, for ease of parsing). This way, only Cfexecd needs to be
changed to do something like this.

BTW, if you choose not to go for this (and I'm willing to code the
generic interface) I added some cruft at around cfexecd.c:432 which
copes with old cfagents who didn't send EmailMaxLines. Since you're
in the area, I'd be obliged if you removed the compatibility code if
it's not too much bother.


Sorry but i do not understand it. Do you mean:
# cfagent -z sysadm
12:basv@sara.nl

# cfagent -z smtpfrom
16:cfengine@sara.nl


Almost.

# cfagent -z <<eof
sysadm
smtpfrom
undefinedVariable
emptyVariable
eof
sysadm=12:basv@sara.nl
smtpfrom=20:cfengine@sara.nl
undefinedVariable=-1:
emptyVariable=0:

How does that strike you?


Should we not use the same syntax for turning on/off actions
 cfagent -z sysadm, smptfrom, ....

It is easier to understand which variables we ask and we get back.
For me it make sense and there is a mechanism to query the cfagent
variables.


Yes, that's nicer, I agree. Currently we use ':' as the standard
separator don't we? So would 'cfagent -z foo:bar:baz -z quux -zbongo'
be okay (as a bizarre way) to ask for foo, bar, baz, quux and bongo?

No the separator is ','. From the docs cfagent -j copy,tidy ;-)
cfagent -x boo,bar,baz -z quux -zbongo is one bizarre way to ask
for some variables.

--
--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: basv@sara.nl      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************





reply via email to

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