> On Wed, Mar 10, 2004 at 01:14:28PM +1100, Tony Green wrote: > Not that I have any cfengine experience, but from your description, > wouldn't AppendIfNoSuchLine followed by ReplaceLineWith do the job? > Creates it if it doesn't exist, and sets it to the right value either > way. For new adds, you'll run both, but I don't think the extra > processing time is going to be noticeable. >
That's kinda where I'd got to and it does work, it just seems wrong. A ReplaceLineWith on a generic 'string.*' will always replace the line (and therefore always edit the file). I was going to wrap it in a BeginGroupIfNoLineMatching, but it's the wrong way around. It may be that there is no elegent way around it, but I'll wait until Uncle Gus pipes up before I consider it a lost cause ;-) > Of course, if that's impossible with cfengine I'll just go away and > hide. You can join me under the table, I have biscuits! > > Out of interest, do have any recommendations as to introductory > cfengine material? I really should learn how to use it, everyone seems > to think it's the world's greatest admin tool. > Debian: apt-get install cfengine-doc Web : http://www.gnu.org/software/cfengine/docs/cfengine-Tutorial.html It really is worth the effort, but it is a lot of effort :-) -- Tony Green <[EMAIL PROTECTED]> -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
