diff options
author | jpaetzel <jpaetzel@FreeBSD.org> | 2011-03-30 17:37:04 +0000 |
---|---|---|
committer | jpaetzel <jpaetzel@FreeBSD.org> | 2011-03-30 17:37:04 +0000 |
commit | 3656a76a3a199d2f7ae4e5758864d147ac0e6b3c (patch) | |
tree | 8a857b21cb474eda0b85b4096be6f78b52392692 /usr.sbin/pc-sysinstall | |
parent | b7152a78463e3772fc8db5b25e3712c69f1bc53d (diff) | |
download | FreeBSD-src-3656a76a3a199d2f7ae4e5758864d147ac0e6b3c.zip FreeBSD-src-3656a76a3a199d2f7ae4e5758864d147ac0e6b3c.tar.gz |
Check in two missing files missed in cleanup.
Change expr to $(())
Switch test from "$?" = "0" to $? -eq 0
Approved by: kib (mentor)
Diffstat (limited to 'usr.sbin/pc-sysinstall')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh | 2 | ||||
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh b/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh index 407c9a4..ccb8d19 100755 --- a/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh +++ b/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh @@ -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 diff --git a/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh b/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh index e786d40..c444f65 100755 --- a/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh +++ b/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh @@ -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 |