Remove some unnecessary sanity checks that break "sh MAKEDEV cd"

and others, because test(1) does not do shortcut evaluation.

Fix the same off-by-one error for acd*t* that revision 1.326 fixed
for other *cd devices.

Suggested by:	bde
Reviewed by:	bde
This commit is contained in:
iedowse 2002-08-10 22:03:58 +00:00
parent f43070c325
commit 3e2d19afb9

View File

@ -796,10 +796,10 @@ acd*t*)
tracks=`expr $i : '.*t\(.*\)'`;
name=acd;
chr=117;
if [ -z "${units}" -o "${units}" -le 0 ]; then
units=1
if [ -z "${units}" ]; then
units=0
fi
if [ -z "${tracks}" -o "${tracks}" -le 0 ]; then
if [ -z "${tracks}" ]; then
tracks=100
fi
if [ "${units}" -le 31 -a "${tracks}" -le 169 ]; then
@ -830,7 +830,7 @@ acd*|cd*|mcd*|scd*)
mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; chr=29;;
scd*) units=`expr $i : '...\(.*\)'`; name=scd; chr=45;;
esac
if [ -z "${units}" -o "${units}" -le 0 ]; then
if [ -z "${units}" ]; then
units=0
fi
if [ "${units}" -le 31 ]; then