From owner-freebsd-hackers Mon Oct 28 4: 9:22 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A858D37B401 for ; Mon, 28 Oct 2002 04:09:20 -0800 (PST) Received: from infinitive.futureperfectcorporation.com (infinitive.futureperfectcorporation.com [196.25.137.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id F239D43E4A for ; Mon, 28 Oct 2002 04:09:17 -0800 (PST) (envelope-from nbm@gerund.futureperfectcorporation.com) Received: (qmail 41181 invoked by uid 0); 28 Oct 2002 12:08:56 -0000 Received: from gerund.futureperfectcorporation.com (196.25.137.65) by infinitive.futureperfectcorporation.com with DES-CBC3-SHA encrypted SMTP; 28 Oct 2002 12:08:56 -0000 Received: (qmail 51244 invoked by uid 1001); 28 Oct 2002 12:11:36 -0000 Date: Mon, 28 Oct 2002 14:11:36 +0200 From: Neil Blakey-Milner To: Peter Pentchev Cc: Dominic Mitchell , Baldur Gislason , Robert Withrow , freebsd-hackers@FreeBSD.ORG Subject: Re: Suggestion: usbd.conf uses rc.conf for options Message-ID: <20021028121136.GA51141@mithrandr.moria.org> References: <20021027193323.C76EA32B3@ns1.rwwa.com> <20021027194710.6AA69AB93@tesla.foo.is> <3DBD2442.5050602@semantico.com> <20021028115722.GB17000@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021028115722.GB17000@straylight.oblivion.bg> User-Agent: Mutt/1.3.27i Organization: iTouch Technology and Architectural Services X-Operating-System: FreeBSD 4.3-RELEASE i386 X-URL: http://mithrandr.moria.org/nbm/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon 2002-10-28 (13:57), Peter Pentchev wrote: > This had better be ". /etc/defaults/rc.conf; source_rc_confs; ..." :) > > I have been thinking for quite some time of writing a little utility > that parses various configuration file mechanisms and allows the > administrator to specify which config mechanism to use for which > program. I have a simple design in mind, which would allow direct > variable setting, use of /etc/rc.conf, use of other configuration files, > use of daemontools-style envdirs, and a couple of others, but so far, > there has been no time to actually start writing a simple > proof-of-concept thing. Funny now, the timing; I was thinking of > writing up a simple rcenv(1) today or tomorrow, and then I saw this > thread :) Go for it (please!). Check out: Subject: non-variables in rc.conf (Re: proposed code: automatic setting of hostname from MAC address) Message-ID: <20020410091703.GA47576@mithrandr.moria.org> On arch mailing list: <<<=== Abstracting the configuration away from "shell scripts and functions" would allow us to pull the configuration in from other locations in the "backend". The one basic example I did perform was in the order of (replace \ns with real enters): eval `echo 'g/^[:space:]*$/d\ng/^#/d\ng/$/s//;/\ng/./' | ed -s \!'cat /etc/rc.alternate.conf'` Anyway, assume that we can get our network configured beforehand, and we can then use ldap, NIS, or whatever (netinfo?) to get our configuration. ===>>> When we can finally get rid of non-variables in the configuration system we no longer rely on 'sh', and we can read configuration using any programming language, and/or (even better) back the configuration up with LDAP or whatever. Neil -- Neil Blakey-Milner nbm@mithrandr.moria.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message