help-cfengine
[Top][All Lists]
Advanced

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

Re: best way to express an 'editfiles' idiom?


From: Daniel Pittman
Subject: Re: best way to express an 'editfiles' idiom?
Date: Mon, 21 Jul 2003 13:34:00 +1000
User-agent: Gnus/5.090016 (Oort Gnus v0.16) XEmacs/21.5 (cassava)

On Mon, 21 Jul 2003, Daniel Pittman wrote:
> When I manage configuration files with cfengine, I frequently find
> myself wanting to express the following action with 'editfiles':
> 
>   Make every line matching "^Value" equal to "Value foo"

[...]

> The best way I have found to express this, so far, has been:
> 
>     CommentLinesMatching "^UsePrivilegeSeparation.*no"
>     AppendIfNoLineMatching "^UsePrivilegeSeparation" "UsePrivilegeSeparation 
> yes"

Ahem. That should have been:

    AppendIfNoSuchLine "UsePrivilegeSeparation yes"

Serves me right not to check that I had the latest version of the file
before posting.

       Daniel

-- 
Never make your home in a place -- make a home for yourself inside
your own head.
        -- Tad Williams




reply via email to

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