From owner-freebsd-bugs@FreeBSD.ORG Wed May 14 16:50:15 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6D9837B401 for ; Wed, 14 May 2003 16:50:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF60E43FAF for ; Wed, 14 May 2003 16:50:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4ENoDUp083380 for ; Wed, 14 May 2003 16:50:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4ENoDfu083379; Wed, 14 May 2003 16:50:13 -0700 (PDT) Resent-Date: Wed, 14 May 2003 16:50:13 -0700 (PDT) Resent-Message-Id: <200305142350.h4ENoDfu083379@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stacy Olivas Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99D5737B401 for ; Wed, 14 May 2003 16:41:23 -0700 (PDT) Received: from thos.digiflux.org (43.Red-80-59-151.pooles.rima-tde.net [80.59.151.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E4F943FCB for ; Wed, 14 May 2003 16:41:22 -0700 (PDT) (envelope-from olivas@thos.digiflux.org) Received: from thos.digiflux.org (localhost [127.0.0.1]) by thos.digiflux.org (8.12.6/8.12.6) with ESMTP id h4ENfJFu007864 for ; Thu, 15 May 2003 01:41:20 +0200 (CEST) (envelope-from olivas@thos.digiflux.org) Received: (from root@localhost) by thos.digiflux.org (8.12.6/8.12.6/Submit) id h4ENfJCP007863; Thu, 15 May 2003 01:41:19 +0200 (CEST) Message-Id: <200305142341.h4ENfJCP007863@thos.digiflux.org> Date: Thu, 15 May 2003 01:41:19 +0200 (CEST) From: Stacy Olivas To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: misc/52256: picobsd build script does not read in user/site config before showing menu X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Stacy Olivas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 23:50:15 -0000 >Number: 52256 >Category: misc >Synopsis: picobsd build script does not read in user/site config before showing menu >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed May 14 16:50:13 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Stacy Olivas >Release: FreeBSD 5.0-RELEASE-p7 i386 >Organization: >Environment: System: FreeBSD thos.digiflux.org 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #7: Sun May 11 00:17:38 CEST 2003 olivas@thos.digiflux.org:/usr/src/sys/i386/compile/Thos i386 >Description: When running the picobsd build script in interactive mode, the site/user config file is not read in *before* the menu of options is displayed. >How-To-Repeat: Create a user config script for a picobsd build and run the picobsd build script in interactive mode. >Fix: The config script should be read in *before* the menu is displayed, so that the user will know what the defaul values are for options like Floppy Disk size. To fix, apply the following patch: --- picobsd Thu May 15 01:22:27 2003 +++ picobsd.new Thu May 15 01:20:41 2003 @@ -5,6 +5,9 @@ # Removed the newfs -p 0 parameter, since it's no longer supported # by newfs in FreeBSD 5.0 - S. Olivas # +# Fixed build script so it reads in site/user config files *before* +# it displays the user dialog screen. - S. Olivas +# # The new PicoBSD build script. Invoked as # # picobsd [options] floppy_type site_name @@ -253,6 +256,16 @@ \t3. Site-info: ${SITE}\n\t4. Full-path: ${MY_TREE}\n" } +# read config variables from a global and then a type-specific file +# basically STAND_LINKS and MY_DEVS, but can also override other +# variables. +# +read_config_files() { + . ${PICO_TREE}/build/config + if [ -f ${MY_TREE}/config ] ; then + . ${MY_TREE}/config + fi +} # Main build procedure. build_image() { @@ -262,15 +275,6 @@ set_msgs printf "${MSG}---> We'll use the sources living in ${SRC}\n\n" - # read config variables from a global and then a type-specific file - # basically STAND_LINKS and MY_DEVS, but can also override other - # variables. - # - . ${PICO_TREE}/build/config - if [ -f ${MY_TREE}/config ] ; then - . ${MY_TREE}/config - fi - # location of the object directory PICO_OBJ=${l_objtree}/picobsd/${THETYPE} log "PICO_OBJ is ${PICO_OBJ}" @@ -326,7 +330,7 @@ while [ true ] ; do set_msgs rm ${c_reply} - dialog --menu "PicoBSD build menu -- (29 sep 2001)" 19 70 12 \ + dialog --menu "PicoBSD build menu -- (15 May 2003)" 19 70 12 \ N "--> READY, build it <---" \ T "${MSG1}" \ K "edit Kernel config file" \ @@ -928,6 +932,7 @@ done set_build_parameters # things that depend on ${SRC} set_type $1 $2 # type and site, respectively +read_config_files # read in site/user config files # If $1="package", it creates a neat set of floppies >Release-Note: >Audit-Trail: >Unformatted: