Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2012 12:14:21 -0600
From:      Ron McDowell <rcm@fuzzwad.org>
To:        Devin Teske <devin.teske@fisglobal.com>
Cc:        freebsd-sysinstall@freebsd.org
Subject:   Re: My thoughts on "bsdconfig"
Message-ID:  <4F170BFD.9060407@fuzzwad.org>
In-Reply-To: <039201ccd559$d77e0e30$867a2a90$@fisglobal.com>
References:  <4F1361C9.4080403@fuzzwad.org> <4F15C86B.5020802@fuzzwad.org> <039201ccd559$d77e0e30$867a2a90$@fisglobal.com>

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


-- 
Ron McDowell
San Antonio TX




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