help-cfengine
[Top][All Lists]
Advanced

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

Re: [Cfengine] Re: cfexecd mail


From: Andrew Stribblehill
Subject: Re: [Cfengine] Re: cfexecd mail
Date: Tue, 29 Jul 2003 16:03:07 +0100
User-agent: Mutt/1.5.4i

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?

> In this situation we still need to change cfagent.c and cfexecd.c to 
> support new variables.

No, cfagent.c can be coded to return the value of any variable not
just specific ones.

> I have made a patch against 2.0.7p3 (debian). It is a simple patch, but
> if we choose another approach is fine for me. The patch now behaves as
> follows if NO 'smtpfrom' variable is set it uses the default one:
>       cfengine@<FQDN>
> 
> I am now in the testing fase ;-)

Glad to see you like my package :)

-- 
WIGHT PORTLAND PLYMOUTH NORTH BISCAY
SOUTHWEST VEERING WEST 4 OR 5, INCREASING 5 TO 7 FOR A TIME.
THUNDERY RAIN THEN SHOWERS. MODERATE WITH FOG PATCHES BECOMING GOOD




reply via email to

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