Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2012 22:31:57 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        Ron McDowell <rcm@fuzzwad.org>
Cc:        freebsd-sysinstall@freebsd.org
Subject:   Re: My thoughts on "bsdconfig"
Message-ID:  <DCCC62A5-CACE-4EF2-8C95-9FBB8E1AE036@fisglobal.com>
In-Reply-To: <4F170BFD.9060407@fuzzwad.org>
References:  <4F1361C9.4080403@fuzzwad.org> <4F15C86B.5020802@fuzzwad.org> <039201ccd559$d77e0e30$867a2a90$@fisglobal.com> <4F170BFD.9060407@fuzzwad.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Jan 18, 2012, at 10:14 AM, Ron McDowell wrote:

> On 1/17/12 2:51 PM, Devin Teske wrote:
>> However, I feel that a better approach would be to allow /usr/libexec/bsdconfig
>> to function more like /etc/rc.d -- specifically that simply installing a new
>> '*.rc' file into said-directory is enough to get a new menu item to appear.
>> 
>> The specifics of which I open to discussion, however I envision the main
>> bsdconfig script doing the following on start-up to accommodate a modular
>> architecture of the root (main) menu:
>> 
>> 1. Look in /usr/libexec/bsdconfig for '*.rc' (or some similar naming
>> convention).
>> 2. Source each one in the following manner:
>> 2.a. first, syntax-check the rc file using "sh -n FILE". If this fails, warn and
>> skip
>> 2.b. next, source the rc file using "." built-in safely from within sub-shell.
>> If this fails, warn and skip.
>> 2.c. The rc file conditionally provides in some manner (like name= in rc.d
>> scripts) details on how to represent the menu item for this module
>> 3. bsdconfig uses said details to construct the menu-item for each individual
>> module
>> 4. bsdconfig presents the menu
>> 5. When a menu item is selected, invoke the appropriate function within the
>> selected module
>> 
>> It makes expanding the tool quite easy as (conceivably) there would be a
>> template for creating new modules (just as there is a template for creating new
>> rc.d scripts).
> 
> I like this.  But it will take some serious in-depth thought.
> 

I've been thinking about how annoying it was that I had to either (a) read a man-page or (b) know to look in /usr/libexec/bsdinstall to know which arguments I can pass to bsdinstall to get to the network configuration module.

To set a better example, I'm thinking that the main-menu of bsdconfig should consist of:

X Exit Utility
1 <module_filename> <short_description>
2 <module_filename> <short_description>
...
A ad nauseum

Sorted alphabetically, the benefit here is that the main-menu continually reminds the user that they can invoke any sub-menu directly by it's displayed name (which not-coincidentally is the modules filename). Any module installed into the module-directort will be displayed alphabetically by it's filename.

I'm going to propose that the module directory be /usr/libexec/bsdconfig

does this sound like a good start?

Regarding the "<short_description>" I have an idea to use ident(1) to pull out $Title$ when processing modules to create the main menu.
-- 
Devin

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DCCC62A5-CACE-4EF2-8C95-9FBB8E1AE036>