From owner-svn-src-all@FreeBSD.ORG Fri Apr 25 02:29:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B70F545; Fri, 25 Apr 2014 02:29:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E4721DBE; Fri, 25 Apr 2014 02:29:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P2TU6g070801; Fri, 25 Apr 2014 02:29:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3P2TURC070800; Fri, 25 Apr 2014 02:29:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201404250229.s3P2TURC070800@svn.freebsd.org> From: Warner Losh Date: Fri, 25 Apr 2014 02:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264909 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 02:29:30 -0000 Author: imp Date: Fri Apr 25 02:29:29 2014 New Revision: 264909 URL: http://svnweb.freebsd.org/changeset/base/264909 Log: Put my inner hobgoblin on a leash: These routines, at least, needed to be {} so they don't run in a subshell. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Fri Apr 25 01:55:14 2014 (r264908) +++ head/tools/tools/nanobsd/nanobsd.sh Fri Apr 25 02:29:29 2014 (r264909) @@ -650,14 +650,14 @@ last_orders () ( # Common Flash device geometries # -FlashDevice () ( +FlashDevice () { if [ -d ${NANO_TOOLS} ] ; then . ${NANO_TOOLS}/FlashDevice.sub else . ${NANO_SRC}/${NANO_TOOLS}/FlashDevice.sub fi sub_FlashDevice $1 $2 -) +} ####################################################################### # USB device geometries @@ -679,7 +679,7 @@ FlashDevice () ( # The generic-hdd device is preferred for flash devices larger than 1GB. # -UsbDevice () ( +UsbDevice () { a1=`echo $1 | tr '[:upper:]' '[:lower:]'` case $a1 in generic-fdd) @@ -697,7 +697,7 @@ UsbDevice () ( exit 2 ;; esac -) +} ####################################################################### # Setup serial console @@ -849,18 +849,18 @@ cust_pkgng () ( # Convenience function: # Register all args as customize function. -customize_cmd () ( +customize_cmd () { NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*" -) +} ####################################################################### # Convenience function: # Register all args as late customize function to run just before # image creation. -late_customize_cmd () ( +late_customize_cmd () { NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*" -) +} ####################################################################### # @@ -877,7 +877,7 @@ pprint() ( fi ) -usage () ( +usage () { ( echo "Usage: $0 [-bfiknqvw] [-c config_file]" echo " -b suppress builds (both kernel and world)" @@ -891,7 +891,7 @@ usage () ( echo " -c specify config file" ) 1>&2 exit 2 -) +} ####################################################################### # Parse arguments