Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 00:27:29 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Julian Elischer <julian@elischer.org>, FreeBSD current users <current@FreeBSD.ORG>
Subject:   Re: config files and includes.
Message-ID:  <p05200f0bba7b5f4b3bef@[128.113.24.47]>
In-Reply-To:  <Pine.BSF.4.21.0302201824180.43932-100000@InterJet.elischer.org>
References:   <Pine.BSF.4.21.0302201824180.43932-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 6:39 PM -0800 2/20/03, Julian Elischer wrote:
>I have just gone through the process of upgrading or installing
>several hundred machines, and that includes altering or editing
>many config files in /etc. ...
>
>For example syslogd.conf or newsyslog.conf are updated between
>releases but they are also prime candidates for local additions.

Note that I'm in the middle of some newsyslog changes, so I'm
willing to think about it from that side of things.  And Wes has
some syslogd changes coming, so maybe he'll be interested.

>What would be really cool is if more config files could
>do 'includes' so that you could have a syslogd.local.conf
>where all your local entries could be. [...]
>
>To do this for every config file would be a lot of work. I do
>wonder however whether there couldn't be some "config-file
>reader" library routine that could be used to pre-pass files
>and do inclusions..

I've thought about this a little, and I felt it was tricky to
get right.  Sometimes you want to just add a line, sometimes
you want to delete one line and add a different one, and
sometimes you need to modify the line (ie, remove lpd-errs
from a line in syslog.conf, but do not disturb whatever else
is on the same line).  I think you'd pretty much need to go
to a new format for all the config files, and that's too big
of a change (IMO) to quickly do.

There's also the question of overhead.  Why do all of this
processing every time newsyslog runs, instead of doing it
once as a part of mergemaster?  So, I was thinking of writing
some addition to mergemaster which could handle this.  Then
it's just a matter of writing one program that knows how to
massage config files, without having to understand the specifics
of any particular config file.  Something like:
    if there is a line:  /var/log/lpd-errs
                    in:  /etc/newsyslog.conf
                  then:   change '644  7' to '644  12'
This strikes me as pretty simple (at least for the changes I
want to propagate).  It's just a change to mergemaster, which
could then be MFC'ed to any release.

That was my thinking on it.  I don't know how well it would
scale up for hundreds of machines though.

>                           [...]   In addition you could
>make it look in /usr/local/etc/syslogd.conf for logging
>requirements for packages.

However, I hadn't been thinking about this part.  Certainly it
would be nice to have something that also handled these issues.
I've futzed around some with some of the uber-flexible config
options on redhat, and I can see how that would be helpful.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f0bba7b5f4b3bef>