Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2012 15:22:08 +0000 (UTC)
From:      Josh Paetzel <jpaetzel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235552 - stable/9/usr.sbin/pc-sysinstall/backend
Message-ID:  <201205171522.q4HFM8xu004681@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jpaetzel
Date: Thu May 17 15:22:08 2012
New Revision: 235552
URL: http://svn.freebsd.org/changeset/base/235552

Log:
  MFC 235453:
  
  Style fixes.
  
  Submitted by:	kmoore
  Obtained from:	PC-BSD
  Sponsored by:	iXsystems

Modified:
  stable/9/usr.sbin/pc-sysinstall/backend/functions.sh
Directory Properties:
  stable/9/usr.sbin/pc-sysinstall/   (props changed)

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions.sh
==============================================================================
--- stable/9/usr.sbin/pc-sysinstall/backend/functions.sh	Thu May 17 15:20:21 2012	(r235551)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions.sh	Thu May 17 15:22:08 2012	(r235552)
@@ -208,15 +208,11 @@ fetch_file()
   FETCHOUTFILE="$2"
   EXITFAILED="$3"
 
-  SIZEFILE="${TMPDIR}/.fetchSize"
   EXITFILE="${TMPDIR}/.fetchExit"
 
-  rm ${SIZEFILE} 2>/dev/null >/dev/null
   rm ${FETCHOUTFILE} 2>/dev/null >/dev/null
 
-  fetch -s "${FETCHFILE}" >${SIZEFILE}
-  SIZE="`cat ${SIZEFILE}`"
-  SIZE=$((SIZE/1024))
+  SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 ))
   echo "FETCH: ${FETCHFILE}"
   echo "FETCH: ${FETCHOUTFILE}" >>${LOGOUT}
 
@@ -278,12 +274,10 @@ get_zpool_name()
     NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'`
 
     # Is it used in another zpool?
-    while
-    z=1
+    while :
     do
       NEWNAME="${BASENAME}${NUM}"
-      zpool import | grep -q "${NEWNAME}"
-      if [ $? -ne 0 ] ; then break ; fi
+      zpool import | grep -qw "${NEWNAME}" && break
       NUM=$((NUM+1))
     done
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205171522.q4HFM8xu004681>