help-cfengine
[Top][All Lists]
Advanced

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

Re: file edit


From: Daniel Nilsson
Subject: Re: file edit
Date: Wed, 6 Feb 2002 13:21:05 +0100 (CET)

Im now running a16, but its the same result.

And, I dont want to edit the first file, only check if a certain string
exists.

The solution with "grep" seems like the only way to do this, but I would
prefer another "cfengine" solution.

/// D

On Tue, 5 Feb 2002, Ian Wallace wrote:

> Daniel - What version of cfengine are you using?  I tried to use the
> softclasses in a actionsequence in a15 only to find out that there's actually
> a scheduling bug which is fixed in a16 that you need to make this sort of
> thing work.  I wonder if it's the same issue?
>
> cheers
> ian
>
> On Wednesday 30 January 2002 04:39 am, 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"
> >         }
> >
> >
> >
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://mail.gnu.org/mailman/listinfo/help-cfengine
>
> --
> Ian Wallace - iwallace@context.com
> Senior Consultant, Context Managed Services
> (W) 303.209.5623 (H) 303.388.9858
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
>




reply via email to

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