help-cfengine
[Top][All Lists]
Advanced

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

Re: Need 'UncommentAndSetValue' or some such


From: Christopher Browne
Subject: Re: Need 'UncommentAndSetValue' or some such
Date: Thu, 27 Oct 2005 02:18:11 GMT

> This is a commonly requested feature, check the archives for the
> discussions.
>
> This is what I find myself doing these days:
>
>     editfiles:
>         { /some/file
>             DeleteLinesStarting "SomeVar" # Or Matching, whatever
>             AppendIfNoSuchLine "SomeVar = SomeValue"
>         }
>
> This is perfectly convergent because cfagent edits the file in a buffer
> and then compares to contents on disk. If there is no difference, the
> actual file is not touched.

This forces the line to the end of the file, right?

The "do something equivalent to assignment" is one of the "holy grail"
sorts of things for some future release.
-- 
(reverse (concatenate 'string "moc.liamg" "@" "enworbbc"))
http://cbbrowne.com/info/
If we were meant to fly, we wouldn't keep losing our luggage.


reply via email to

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