help-cfengine
[Top][All Lists]
Advanced

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

file edit


From: Daniel Nilsson
Subject: file edit
Date: Wed, 30 Jan 2002 12:39:01 +0100 (CET)

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"
        }





reply via email to

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