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 11:34:53 +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 <address@hidden> (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:address@hidden

  # cfagent -z smtpfrom
  16:address@hidden


Almost.

# cfagent -z <<eof
sysadm
smtpfrom
undefinedVariable
emptyVariable
eof
sysadm=12:address@hidden
smtpfrom=20:address@hidden
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.

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 :)


We are also using debian and the debian package is easy to maintain
with my own patches :-)


--
--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: address@hidden      *
*  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]