svn commit: r235552 - stable/9/usr.sbin/pc-sysinstall/backend
Josh Paetzel
jpaetzel at FreeBSD.org
Thu May 17 15:22:09 UTC 2012
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
More information about the svn-src-stable-9
mailing list