[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file edit
From: |
Ian Wallace |
Subject: |
Re: file edit |
Date: |
Wed, 6 Feb 2002 10:35:55 -0700 |
I'm no expert on this sort of thing, and have no idea when a 'defined' class
really becomes active. I'm thinking this is question for folks way more
knowledgable. As a general question is there anything in the tutorial on how
this type of things works? I know that cfengine is supposed to keep an up to
the minute list of active classes (so that you can use modules, etc) but I
have never had to do this.
Sorry I can't be of more help, maybe someone else has a work around.
cheers
ian
On Wednesday 06 February 2002 05:21 am, Daniel Nilsson wrote:
> 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
--
Ian Wallace - iwallace@context.com
Senior Consultant, Context Managed Services
(W) 303.209.5623 (H) 303.388.9858