On Thursday 03 November 2005 14:04, Wil Cooley wrote:
> What happens is that I'm editing my config file and cfagent makes its
> scheduled run, notices the file is changed and the replaces it.  I tend,
> as a result, to suspend my editor session while making changes so if it
> happens I can resume and rewrite my changed version.  What seems like it
> would be fairly straightforward to implement would be a user-initiated
> locking mechanism, so that a locked file would not be updated but an
> alert generated that the file was wrong date/checksum/etc.  Something
> like this:
>
> # cflock /etc/httpd/conf.d/foo.conf
> # vi /etc/httpd/conf.d/foo.conf
> # cflock -u /etc/httpd/conf.d/foo.conf
>
I have a module that runs before my confs are updated which compares the files 
one the local filesystem to a local cache. Things are then updated only if 
everything is in a known sane state. Otherwise an alert is sent stating that 
someone changed a file without following procedure. That way cfagent won't 
ever 'break' someone's 'temporary' fix.
-JayKim


_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to