[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Three-Line service comments
From: |
Adrian Phillips |
Subject: |
Re: Three-Line service comments |
Date: |
02 Aug 2001 07:21:23 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
>>>>> "Tim" == Tim Auckland <Tim.Auckland@procket.com> writes:
[Note, cfengine newbie]
Tim> A common format for labeling services in, eg, inetd.conf is
Tim> to add a comment group just before the service.
Tim> For example:
Tim> # # GNATS # support stream tcp nowait gnats
Tim> /usr/libexec/gnats/gnatsd gnatsd
Yes, I've noticed this myself with the editfiles action, that
multiline edits can be difficult but I though I'd read that this was
to be fixed for v2 ?
Anyway, another hack (!) to sort this (untested) :-
!GnatsServers::
{ /etc/inet/inetd.conf
SetScript "/bin/sh -c perl -0777 -e '$_ = <STDIN>; s/(#.*\n)*support
stream.*\n//; print' < tt"
RunScriptIfLineMatching "gnatsd"
}
or something along those lines.
One possibly way to solve this in cfengine would be a way to specify
the newline as one can with perl, then any regexps could be made to
work on several lines at a time, e.g. :-
NewLine 0777
ReplaceAll "(#.*\n)*support stream.*\n" With ""
(Perhaps this works already ?)
Sincerely,
Adrian Phillips
--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]