Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 1996 01:50:22 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        current@FreeBSD.org
Subject:   Re: Knobs in /etc/sysconfig 
Message-ID:  <26275.831977422@time.cdrom.com>
In-Reply-To: Your message of "Tue, 25 Jul 1995 15:04:47 %2B0930." <199507250534.PAA01801@genesis.atrad.adelaide.edu.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
[ 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?26275.831977422>