help-cfengine
[Top][All Lists]
Advanced

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

Re: Locking for temporary ad-hoc changes?


From: Jason Kim
Subject: Re: Locking for temporary ad-hoc changes?
Date: Thu, 3 Nov 2005 14:25:43 -0500
User-agent: KMail/1.8.2

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




reply via email to

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