From owner-freebsd-current Thu Feb 20 21:28:10 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B232737B401 for ; Thu, 20 Feb 2003 21:28:08 -0800 (PST) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECEF843FBF for ; Thu, 20 Feb 2003 21:28:07 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.7/8.12.7) with ESMTP id h1L5RV0H019795; Fri, 21 Feb 2003 00:27:32 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: Date: Fri, 21 Feb 2003 00:27:29 -0500 To: Julian Elischer , FreeBSD current users From: Garance A Drosihn Subject: Re: config files and includes. Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-Spam-Score: -0.5 () IN_REP_TO,REFERENCES,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_03_05 X-Scanned-By: MIMEDefang 2.28 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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