help-cfengine
[Top][All Lists]
Advanced

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

RE: Three-Line service comments


From: Tim Auckland
Subject: RE: Three-Line service comments
Date: Fri, 3 Aug 2001 16:50:37 -0700

I understand, but many sysadmins are used to using this comment style
and there are a number of software packages that automatically install
themselves in this way, so if I can use cfengine to maintain the file
as-is then I can concentrate on configuring cfengine for our site,
rather than the other way round.  We have a lot more systems than I have
cf files.  :-)

Another multi-line problem I've encountered is systems that use the '\'
character for continuation lines, eg HP-UX 11 systems often contain a
line in inetd.conf like:

tftp        dgram  udp wait   root /usr/lbin/tftpd    tftpd\
        /opt/ignite\
        /var/opt/ignite

Cfengine won't be able to comment out this entry safely.  I couldn't see
any way of joining up the continuation lines within cfengine, so I've
added another perl segment to fix these up before normal processing
(unless they're already commented out), eg:

      SetScript "perl -00 -pi -e 'BEGIN{pop};s/\s*\\\n\s+/\t/g'"
      RunScriptIfLineMatching "^[^#].*\\$"

Tim

> -----Original Message-----
> From: Mark.Burgess@iu.hio.no [mailto:Mark.Burgess@iu.hio.no] 
> Sent: Friday, August 03, 2001 4:39 PM
> To: Tim Auckland
> Subject: Re: Three-Line service comments
> 
> 
> On  3 Aug, Tim Auckland wrote:
> > If I'm using 30-year old tools like sed and awk then I will 
> make such 
> > allowances for their limitations, but as Adrian indicated, 
> perl has no 
> > problem with this.  I was just hoping cfengine's own 
> facilities would 
> > be sufficient for the task.
> > 
> 
> They are sufficient if you have sufficient imagination, but 
> my point was that the entire problem could be avoided. 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 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]