[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two new editfiles-commands
From: |
Mark . Burgess |
Subject: |
Re: Two new editfiles-commands |
Date: |
Fri, 26 Oct 2001 19:44:06 +0200 (MET DST) |
On 26 Oct, Alexander Mattausch wrote:
> Hello!
>
> I have added two new commands to the editfiles section:
>
> BeginGroupIfDefined and BeginGroupIfNotDefined
>
> They both start a group if a certain class is defined (or not defined).
> Up to now, class-specific edit commands on the same file had to be done
> this way (at least I found no better way ;-):
>
> editfiles:
> { /etc/xyz
> commands
> }
>
> abc::
> { /etc/xyz
> commands
> }
>
> With BeginGroupIfDefined it can be done like that.
> { /etc/xyz
> commands
> BeginGroupIfDefined "abc"
> commands
> EndGroup
> }
>
> IMO this is a more convenient way to do class-specific edit commands and
> also allows for more complex constructs, especially in conjunction with
> other BeginGroup commands. We use it, for example, to first copy a
> standard restrictive hosts.allow in a copy-section and then to open
> services again, depending on the classes that are defined.
>
> I have attached a patch for both cfengine 1.6.3 and 2.0.a14. The
> 1.6.3-patch also contains an addition to the documentation.
>
> Regards,
> Alex
>
Thanks for your efforts. I shall look carefully at these
when I next get to do some work on cfengine (around Xmas).
best,
Mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~