From owner-freebsd-sysinstall@FreeBSD.ORG Fri Jan 20 06:32:04 2012 Return-Path: Delivered-To: freebsd-sysinstall@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89277106566C for ; Fri, 20 Jan 2012 06:32:04 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 512408FC13 for ; Fri, 20 Jan 2012 06:32:03 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa05 [127.0.0.1]) by ltcfislmsgpa05.fnfis.com (8.14.4/8.14.4) with SMTP id q0K6PgA6028600; Fri, 20 Jan 2012 00:32:02 -0600 Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa05.fnfis.com with ESMTP id 12f0py8aau-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 20 Jan 2012 00:32:02 -0600 Received: from [10.0.0.104] (10.14.152.28) by smtp.fisglobal.com (10.132.206.17) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 20 Jan 2012 00:32:01 -0600 MIME-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="us-ascii" From: Devin Teske In-Reply-To: <4F170BFD.9060407@fuzzwad.org> Date: Thu, 19 Jan 2012 22:31:57 -0800 Content-Transfer-Encoding: quoted-printable Message-ID: References: <4F1361C9.4080403@fuzzwad.org> <4F15C86B.5020802@fuzzwad.org> <039201ccd559$d77e0e30$867a2a90$@fisglobal.com> <4F170BFD.9060407@fuzzwad.org> To: Ron McDowell X-Mailer: Apple Mail (2.1084) X-Originating-IP: [10.14.152.28] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361, 1.0.211, 0.0.0000 definitions=2012-01-20_01:2012-01-20, 2012-01-20, 1970-01-01 signatures=0 Cc: freebsd-sysinstall@freebsd.org Subject: Re: My thoughts on "bsdconfig" X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 06:32:04 -0000 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/bs= dconfig >> 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 appe= ar. >>=20 >> 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: >>=20 >> 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=3D 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 indiv= idual >> module >> 4. bsdconfig presents the menu >> 5. When a menu item is selected, invoke the appropriate function within = the >> selected module >>=20 >> 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 creat= ing new >> rc.d scripts). >=20 > I like this. But it will take some serious in-depth thought. >=20 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 arg= uments 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 shoul= d consist of: X Exit Utility 1 2 ... A ad nauseum Sorted alphabetically, the benefit here is that the main-menu continually r= eminds the user that they can invoke any sub-menu directly by it's displaye= d name (which not-coincidentally is the modules filename). Any module insta= lled into the module-directort will be displayed alphabetically by it's fil= ename. I'm going to propose that the module directory be /usr/libexec/bsdconfig does this sound like a good start? Regarding the "" I have an idea to use ident(1) to pull = out $Title$ when processing modules to create the main menu. --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.