help-cfengine
[Top][All Lists]
Advanced

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

editfiles and multiple lines


From: Ferguson, Steve
Subject: editfiles and multiple lines
Date: Fri, 1 Aug 2003 14:31:02 -0400

I'm trying to write a cfengine config that will allow me to disable an
arbitrarily long list of services in inetd.conf.  Someone must have done
this.  Hopefully you can show me a simpler way.  Here's what I've got:

    { /etc/inetd.conf
      HashCommentLinesMatching "^\<chargen\>.*"
      HashCommentLinesMatching "^\<daytime\>.*"
... repeat for all services
      DefineClasses "HupInetd"
    }

I'd like to be able to dump all the services in a file (which I copy out to
each host through cfengine).  Here's what I envision as a cleaner solution,
but I can't figure out the correct syntax.  I'm not even sure it's possible.

    { /etc/inetd.conf
      ForEachLineIn "/var/cfengine/scripts/etc/inetd_off"
        HashCommentLinesMatching "^\<ThisLine\>.*"
      EndLoop
      DefineClasses "HupInetd"
    }

Any suggestions?

Thanks,
Steve

--
Steve Ferguson
gedas USA, Inc.
Steve.Ferguson@gedas.com
http://www.gedasusa.com




reply via email to

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