help-cfengine
[Top][All Lists]
Advanced

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

Re: Create Action Script


From: Gustavo De la Cruz Tovar
Subject: Re: Create Action Script
Date: Thu, 24 May 2001 15:26:57

I'm doing the following:
Using groups section, I invoke a command and if it exits ok (with
exit 0), a class is defined.

For examples:
groups:
p01 = ( "/bin/test -f ${PRICES_DATA_HOME}/2.TMP" )u

control:
        actionsequence= ( shellcommands copy )
shellcommands:
        p01::
                "command_for_notify"


to check if such file exists. But I think you can invoke another
command.

If you have such class, you cand define another actions , in  order
to notify or may be apply a correction.
----

gus
From: Matt Armstrong <address@hidden>
To: Liston Bias <address@hidden>
CC: <address@hidden>
Subject: Re: Create Action Script
Date: 23 May 2001 18:39:07 -0700

Liston Bias <address@hidden> writes:

> General Questions:
>
> Can cfengine be configured to notify admin of conditions that are
> not correct and wait for admin to intervene before fixing?

Yes.  For example, I want the /etc/init.d/postfix file on my system to
copy /etc/passwd into the chroot jail postfix's smtpd runs in.  I know
that if /etc/init.d/postfix doesn't have "etc/passwd" in it, then it
won't be doing this copy.  So I have this in my cfengine.conf:

editfiles:
        {
                /etc/init.d/postfix

                WarnIfNoLineContaining "etc/passwd"
        }

Most everything in cfengine seems to have a way to just warn about the
problem instead of fixing it.

By "warn" cfengine means "print something" -- it is up to you to set
up scripts to send e-mail to the right person if cfengine prints
something.  There are example scripts in the distribution.

--
matt

_______________________________________________
Help-cfengine mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-cfengine

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




reply via email to

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