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:
parent
c33b75754d
commit
9e4dbe2e99
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220162
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user