help-cfengine
[Top][All Lists]
Advanced

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

Re: editfiles: adding/updating config file sections


From: Kai Großjohann
Subject: Re: editfiles: adding/updating config file sections
Date: Mon, 21 Oct 2002 21:37:09 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Paul Heinlein <heinlein@cse.ogi.edu> writes:

> On Sat, 19 Oct 2002, Kai Großjohann wrote:
>
>> We have a lot of verses like the following in our cfengine 1.6
>> configuration:
>> 
>>     # Frob IDE parameters for speed.
>>     { /etc/init.d/hwtools
>>         AppendIfNoSuchLine "# begin i06"
>>         AppendIfNoSuchLine "# end i06"
>>         LocateLineMatching "# begin i06"
>>         DeleteToLineMatching "# end i06"
>>         DeleteLinesMatching "# end i06"
>>         AppendIfNoSuchLine "# begin i06"
>>         AppendIfNoSuchLine "# end i06"
>>         ResetSearch "1"
>>         LocateLineMatching "# begin i06"
>>         InsertFile "$(cfedir)/files/_etc_init.d_hwtools.template"
>>     }
>
> I think I'd do something a bit different:
> [[ use the source shell command ]]

That's a creative solution, but actually it shows a bug in my example :-/
We have other files where there is a similar problem.  For example,
/etc/printcap was a problem previously.  (Now we use CUPS.)  But I'm
sure the general problem does not go away, even if I can't find a
really good example at the moment.

Hm.  We put ssh public keys in some files.  We frob /etc/auto.master
(on hosts without NIS).  We have our own entries in /etc/inetd.conf.
We have our own mail aliases.  Own entries for /etc/services.  Some
entries in /etc/hosts (the hosts relevant for `ifconfig').  We have a
standard /etc/fstab part (which is slightly different for some groups
of hosts).  /etc/exports.  /etc/apt/sources.list has a part which is
valid for all hosts but some other parts valid only for some hosts.

Does this help to see the problem?

My naive opinion was that millions of other CFengine users must have
the same problem, so there must be a very mature solution, so why
should I reinvent the wheel?  :-)
Or do you folks just copy such files?

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)






reply via email to

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