1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

Check in two missing files missed in cleanup.

Change expr to $(())
Switch test from "$?" = "0" to $? -eq 0

Approved by:	kib (mentor)
This commit is contained in:
Josh Paetzel 2011-03-30 17:37:04 +00:00
parent c33b75754d
commit 9e4dbe2e99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220162
2 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ fi
# If this is an empty disk, see if we need to create a new scheme for it
gpart show ${DISK} >/dev/null 2>/dev/null
if [ "$?" != "0" -a "${SLICENUM}" = "1" ] ; then
if [ $? -eq 0 -a "${SLICENUM}" = "1" ] ; then
gpart create -s ${TYPE} ${DISK}
fi

View File

@ -57,10 +57,10 @@ PARTINDEX=""
while
z=1
do
CHARS=`expr $CHARS - 1`
CHARS=$((CHARS-1))
LAST_CHAR=`echo "${PARTITION}" | cut -c $CHARS`
echo "${LAST_CHAR}" | grep "^[0-9]$" >/dev/null 2>/dev/null
if [ "$?" = "0" ] ; then
echo "${LAST_CHAR}" | grep -q "^[0-9]$" 2>/dev/null
if [ $? -eq 0 ] ; then
PARTINDEX="${LAST_CHAR}${PARTINDEX}"
else
break