help-cfengine
[Top][All Lists]
Advanced

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

Re: copy action trigger another action


From: Thomas Glanzmann
Subject: Re: copy action trigger another action
Date: 9 Jan 2003 19:05:47 GMT
User-agent: slrn/0.9.7.4 (Linux)

> I'm interested in people's thoughts on whether it would be useful to
> have successful copies trigger an action. I'm thinking along the lines
> of sending a HUP to a daemon when it's config file is updated.

Hrm. It is hard to say. Because I always force stuff like that. And I send my
syslog every hour a HUP.

> With most daemons it is fine to simply HUP every time cfagent runs, but
> with syslog-over-tcp my connections drop and have to restablish every
> time the syslog daemon is HUP'd. During the period that the connection
> is waiting to re-establish (one minute) the buffering logs might
> overflow and start getting dropped before being sent on to the loghost
> when the connection is re-established.

But what about touch /tmp/lastrun

http://www.cfengine.org/docs/cfengine-Reference.html#Evaluated%20classes

... and than do a ...

IsNewerThan(/tmp/lastrun, /etc/syslog.conf)
True if file 2 is modified more recently than file 1. (mtime)

> I'd imagine I could write a cfengine module to do this, but I'm not much
> of a programmer and would rather it was implemented in the core and done
> Right(tm).

Is there a way to do something like that right? The problem is that I want only
that thing set if one file changed. For me I always copy a bunch of files ...

Greetings,
        Thomas
--
Thomas Glanzmann  ++49 (0) 9131 85-27574   Department of Computer Science III
Martensstrasse 3  D-91058 Erlangen Germany   University of Erlangen-Nuremberg
            http://www3.informatik.uni-erlangen.de/Research/UMLinux/


reply via email to

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