help-cfengine
[Top][All Lists]
Advanced

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

Re: Filters and editfiles:


From: Mark . Burgess
Subject: Re: Filters and editfiles:
Date: Fri, 24 Aug 2001 18:02:22 +0200 (MET DST)

On  5 Apr, Barry_W_Anderson@nag.national.com.au wrote:
> 
> 
> It seems like a really useful way of using filters would be passing a 
> directory
> to editfiles and letting a filter return which files to use. It doesn't (seem
> to) work. It could be my limited understanding, which is why I'm not sending
> this straight to bugs-cfengine. But should the following work? It doesn't use
> the filter AT ALL (as far as I can tell) on either Linux 2.2.16 or Solaris.
> 
> cheers,
> Barry
> 
> #!/usr/local/sbin/cfengine -f
> 
> control:
> 
> any::
>    actionsequence = ( editfiles )
> 
> filters:
> 
>    { disable_init_scripts
>       NameRegex:
> "(asppp)|(autofs)|(autoinstall)|(buttons_n_dials_setup)|(dtlogin)|(init.dmi)|(init.snmpdx)"
> 
>       Result: "NameRegex"
>    }
> 
> editfiles:
> 
>    { /etc/inetd.conf
> 
>       HashCommentLinesMatching "^[^#].*"
>    }
> 
>    { /etc/rc.d
> 
>       Filter disable_init_scripts
> 
>       LocateLineMatching "^[^#].*"
>       BeginGroupIfNoLineContaining "### disabled for added security ..."
> 
>          InsertLine ""
>          InsertLine "### --------------------------------------------"
>          InsertLine "### disabled for added security ... nconbwa"
>          InsertLine "exit 0"
>          InsertLine "### --------------------------------------------"
> 
>       EndGroup
>    }
> 
> __________________________________________________________________________
> The information contained in this email communication may be confidential. You
> should only read, disclose, re-transmit, copy, distribute, act in reliance on 
> or
> commercialise the information if you are authorised to do so. If you are not 
> the
> intended recipient of this email communication, please notify us immediately 
> by
> email to NABpost@nag.national.com.au or reply by email direct to the sender
> and then destroy any electronic or paper copy of this message.  Any views
> expressed in this email communication are those of the individual sender, 
> except
> where the sender specifically states them to be the views of a member of the
> National Australia Bank Group of companies.  The National Australia Bank Group
> of companies does not represent, warrant or guarantee that the integrity of 
> this
> communication has been maintained nor that the communication is free of 
> errors,
> virus or interference.
> 



I'm putting out a12 today with this fixed. Be careful with it,
no documentation yet, so mainly for playing with. The "cfagent"
aka old cfengine should be fine, but be careful anyway. More
to come soon.

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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