help-cfengine
[Top][All Lists]
Advanced

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

Re: file edit


From: Alexander Mattausch
Subject: Re: file edit
Date: Wed, 06 Feb 2002 10:51:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:0.9.7) Gecko/20011221

Hello Daniel,

Daniel Nilsson wrote:

Hi!

Im trying to get cfengine to edit one file if another file contains a
specific word.

I tried with the following code, but it doesnt work...


editfiles:

       solaris::

       { /etc/mail/sendmail.cf
         BeginGroupIfNoLineContaining "null-Client v0.1"
           DefineClasses sendmail_edit
         EndGroup
       }


       sendmail_edit.solaris::
       { /usr/lib/mail/cf/null.mc
         AutoCreate
         EmptyEntireFilePlease
         AppendIfNoSuchLine "VERSIONID(`null-Client v0.1')"
         AppendIfNoSuchLine "OSTYPE(`solaris2')"
         AppendIfNoSuchLine
"FEATURE(`nullclient',`mailhost.my.domain'
)"
         AppendIfNoSuchLine "MASQUERADE_AS(`my.domain')"
         DefineClasses "m4_run"
         DefineClasses "sendmail_restart"
       }

Just to exclude the obvious...

You have declared sendmail_edit with AddInstallable in the control section?

Regards,
Alex





reply via email to

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