From owner-freebsd-current Mon May 13 01:51:54 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA01958 for current-outgoing; Mon, 13 May 1996 01:51:54 -0700 (PDT) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id BAA01949 for ; Mon, 13 May 1996 01:51:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with SMTP id BAA26277; Mon, 13 May 1996 01:50:22 -0700 (PDT) To: Michael Smith cc: current@FreeBSD.org Subject: Re: Knobs in /etc/sysconfig In-reply-to: Your message of "Tue, 25 Jul 1995 15:04:47 +0930." <199507250534.PAA01801@genesis.atrad.adelaide.edu.au> Date: Mon, 13 May 1996 01:50:22 -0700 Message-ID: <26275.831977422@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk [ Digging deep into his pile of mail for which an answer was warranted but not given, Jordan yanks forth the following hoary gem - wow, July of '95!] >Subject: Re: Knobs in /etc/sysconfig >To: jkh@time.cdrom.com (Jordan K. Hubbard) >Date: Tue, 25 Jul 1995 15:04:47 +0930 (CST) >Cc: msmith@atrad.adelaide.edu.au, current@FreeBSD.org >In-Reply-To: <3128.806642718@time.cdrom.com> from "Jordan K. Hubbard" at Jul 24, 95 08:25:18 pm >Content-Type: text >Content-Length: 2803 > > Hmm, configuration files : the bane of my existence 8) > > Before I/we get too rampant on this, what's the feeling (in particular > from Rod, of course 8) on imposing some structure on the layout of > /etc/sysconfig? I was just looking at this again the other day, and it seems like a structure like the one you propose might possibly work. Recapped for those who have almost certainly forgotten it: > A first cut would look something like this : > > Lines beginning with '#' are comments. Lines beginning with '#*' are > structure comments. > > #* Section: Keyboard > ... > #* Keyword: KBD_repeat_rate > #* OneOf: "No change"=none,"Fast"=fast,"Medium"=medium,"Slow"=slow > #* Default: none > > KBD_repeat_rate = none > ... > #* Section: Networking > ... > #* Keyword: NET_interface_list > #* String: > #* Default: "ed0 lp0" > > NET_interface_list = "ed0 ed1" > ... > etc. > > It's impossible to embed _all_ of the intelligence required into these > comments, and overdoing it is harmful to your sanity, but minimising the > keyword-specific intelligence required for processing would be nice 8) I think it's already on the borderline of `overdone' as it is, so you won't catch me willfully adding to it. :-) Nonetheless, it looks like a more than reasonable start. > Some other proposals : variable name prefixes. I've already proposed > KBD and NET, I'll add PKG_pkgname for package-specific stuff (in a > Packages section). > > As far as types are concerned, I see current use of : > > Boolean : ON/OFF > OneOf : one of a,b,c,d > ListOf : none or more of a,b,c,d > String : some string value > StringBoolean : some string value or OFF (or NO or something similar). > FQDN : qualified name (dotted address style) > IPADDR : a dotted-quad value. > Pathname : a pathname > > I can see possible use for : > > Mailaddr : a mail address > Device : a device name > > And I'm sure I've missed some. Hmm. Seems like "StringBoolean" is just a degenerate case of "OneOf YES,NO,OFF,ON" or whatever, but aside from that the selection seems fine to me. I like it! Why don't we do that already? If you knew how the sysconfig munging in sysinstall worked, you'd barf - we need something better. :-) Jordan