From owner-freebsd-arch Sun Mar 9 13:32:17 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90C3537B401 for ; Sun, 9 Mar 2003 13:32:15 -0800 (PST) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3AF543FBF for ; Sun, 9 Mar 2003 13:32:14 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.7) with ESMTP id h29LWBD5020967; Sun, 9 Mar 2003 16:32:11 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20030310000219.N15648-100000@gamplex.bde.org> References: <20030310000219.N15648-100000@gamplex.bde.org> Date: Sun, 9 Mar 2003 16:32:10 -0500 To: Bruce Evans From: Garance A Drosihn Subject: Re: NEWSYSLOG changes, -Create option for rc.diskless Cc: arch@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.28 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:48 AM +1100 3/10/03, Bruce Evans wrote: >On Sun, 9 Mar 2003, Garance A Drosihn wrote: >> > > I have an update in: >> http://people.freebsd.org/~gad/newsyslog/create-opt.diff >> >> which implements a '-C' option for newyslog. Once this is >> committed, /etc/rc.diskless2 should be changed to use it. The >> update also adds a a 'C' flag for the config file entries, to > > match an option that NetBSD has. > >mtree(8) should be used to control the original files. The >original set of files very little to do with newsyslog. It has >more to do with syslogd, but it's normal for both syslog.conf >and newsyslog.conf to have default rules for files that don't >exist, with the actual creation done manually. Manual creation >is too hard to do for diskless mounts, so we need a database, >and mtree(8) handles this perfectly: Well, the idea of -C is to make the "manual creation" process something that rc.diskless2 can do trivially and reliably, by just asking newsyslog to do it. If we instead use mtree to create the initial files, then I think we'll end up with two different databases that will have to have the same information. However, I have been thinking about the fact that newsyslog.conf does often contain rules for files that don't exist. This patch currently adds the -C option, and also adds a C flag for config-file entries. Perhaps the 'C' flag should not mean "always create this file if it does not exist". Perhaps it should mean "create this file if it does not exist, and if -C was given". That way, the -C option becomes "create all log files which have a C flag". That means our C flag would be a little different than NetBSD's C flag, but I think it's a reasonable idea. That way the config file can have a long list of entries, only some of which would be automatically created. What do people think about that idea? [the more I think about it, the more I like it, although it means more explanation will be needed in the man page] -- 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-arch" in the body of the message