From owner-freebsd-current Mon Jul 24 22:16:53 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id WAA09536 for current-outgoing; Mon, 24 Jul 1995 22:16:53 -0700 Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id WAA09524 for ; Mon, 24 Jul 1995 22:16:45 -0700 Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.9/8.6.9) id PAA01801; Tue, 25 Jul 1995 15:04:47 +0930 From: Michael Smith Message-Id: <199507250534.PAA01801@genesis.atrad.adelaide.edu.au> 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 Sender: current-owner@FreeBSD.org Precedence: bulk Jordan K. Hubbard stands accused of saying: > > Please ensure that the default "yes" values are documented in the comments > > preceeding each knob; preferably in some standard format, eg: > > > > # default: > > Sounds reasonable.. We still need to go through and ethnically clense > our handling of variables in general, actually. It would be nice if > there was a STANDARD NAMING CONVENTION that told one whether or not a > given variable was a Boolean, a list of arguments, a list of things > that had their own sub-variables (like the network_interfaces var), > etc. 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? 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) 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. The alternative to the structure comments is a hints file, but keeping the two in sync would be a major nuisance, and would really only hit the limelight if a proposal similar to the above was rejected. > Probably the time to do that is now before it gets too big, but I'm > also not going to hold my breath. It's work. Not as much as some other things. Thoughts? > Jordan -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] My car has "demand start" - Terry Lambert [[