[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Filters and editfiles:
From: |
Barry_W_Anderson |
Subject: |
Filters and editfiles: |
Date: |
Thu, 5 Apr 2001 21:41:32 +1000 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Filters and editfiles:,
Barry_W_Anderson <=