From owner-svn-src-all@FreeBSD.ORG Fri May 4 16:40:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13D431065672; Fri, 4 May 2012 16:40:11 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id BC2568FC1A; Fri, 4 May 2012 16:40:10 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so4461374pbb.13 for ; Fri, 04 May 2012 09:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=OSsDv0j8rMYgL8lw65iG2OJnyTQeVF8vetEsuC0v84c=; b=osciytzUpHCKkr5v/CZF8z/eWKjG4c2bX2VvcIcWGg7sYGIi3Xs+nuFlYI5JZ2xSPa 3yoqu6pv52NsruB7I+7pkclag9vAO+Ozj/aQtCLp+LW+U4449VEleQ3EhAH06PNaeFRR cNTVyqc/uguTjCnFceEeq9ftu+RER09qlpJZ1XxYCl3oYn5iw1NyJVxeBc5cF7SpOgZT r+jWtyUjBKgqzF71HkAwoZMoIQNj0zHKXCco9fVtCq0Ry1mzARQq/0hpypWjHKM0fK/H 3ea8SerdPDTnoBuU9m9jwqm/9CzUYqq4xoilMgZ3PhUcgJwTYAznC/hGA1uGsXqunB8J wZYA== Received: by 10.68.233.136 with SMTP id tw8mr2127621pbc.71.1336149224972; Fri, 04 May 2012 09:33:44 -0700 (PDT) Received: from [10.170.185.186] (mobile-166-147-081-047.mycingular.net. [166.147.81.47]) by mx.google.com with ESMTPS id q5sm9058810pbp.28.2012.05.04.09.33.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 May 2012 09:33:43 -0700 (PDT) References: <201205041531.q44FVaYF010236@svn.freebsd.org> In-Reply-To: <201205041531.q44FVaYF010236@svn.freebsd.org> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: X-Mailer: iPhone Mail (9B179) From: Garrett Cooper Date: Fri, 4 May 2012 09:33:38 -0700 To: Josh Paetzel Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "kmoore@freebsd.org" Subject: Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 04 May 2012 16:40:11 -0000 On May 4, 2012, at 8:31 AM, Josh Paetzel wrote: > Author: jpaetzel > Date: Fri May 4 15:31:35 2012 > New Revision: 235005 > URL: http://svn.freebsd.org/changeset/base/235005 >=20 > Log: > Use a unique zpool name during install, in the case of having another > PC-BSD / FreeBSD zpool on the system for another install. >=20 > Submitted by: kmoore > Obtained from: PC-BSD > MFC after: 3 days > Sponsored by: iXsystems >=20 > Modified: > head/usr.sbin/pc-sysinstall/backend/functions.sh >=20 > Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/usr.sbin/pc-sysinstall/backend/functions.sh Fri May 4 15:27:1= 8 2012 (r235004) > +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Fri May 4 15:31:3= 5 2012 (r235005) > @@ -216,7 +216,7 @@ fetch_file() >=20 > fetch -s "${FETCHFILE}" >${SIZEFILE} > SIZE=3D"`cat ${SIZEFILE}`" > - SIZE=3D"`expr ${SIZE} / 1024`" > + SIZE=3D$((SIZE/1024)) Bug; should be '$SIZE/' > echo "FETCH: ${FETCHFILE}" > echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT} >=20 > @@ -276,11 +276,22 @@ get_zpool_name() > else > # Need to generate a zpool name for this device > NUM=3D`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'` > - NEWNAME=3D"${BASENAME}${NUM}" > + > + # Is it used in another zpool? > + while > + z=3D1 > + do while : do Is better. > + NEWNAME=3D"${BASENAME}${NUM}" > + zpool import | grep -q "${NEWNAME}" > + if [ $? -ne 0 ] ; then break ; fi Please decompress the conditional. > + NUM=3D$((NUM+1)) Another bug (see above). Thanks, -Garrett=