help-cfengine
[Top][All Lists]
Advanced

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

Re: vipw with cfengine?


From: Kai Großjohann
Subject: Re: vipw with cfengine?
Date: Wed, 27 Nov 2002 16:12:38 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> vipw does some magic to lock the file.  Is this also possible with
> cfengine?

A convenient method to implement it would be a pair of commands.  The
first command locks the file (like vipw does before invoking $EDITOR)
and copies /etc/passwd to a temp file to a known name.  CFengine can
then edit this temp file.  The second command copies the temp file
back to /etc/passwd and unlocks.

Then cfagent.conf could invoke shellcommands.firstcommand, then
editfiles, then shellcommands.secondcommand, and Bob's my uncle.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)






reply via email to

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