My thoughts on "bsdconfig"

Ron McDowell rcm at fuzzwad.org
Wed Jan 18 18:14:28 UTC 2012


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



More information about the freebsd-sysinstall mailing list