Use printf (shell builtin) instead of cut - cut isn't in /bin.

This should fix the ttyA* and cuaA* up to the maximum possible 128 nodes.
This commit is contained in:
Peter Wemm 2000-05-08 22:56:17 +00:00
parent f6ede19c6d
commit 8ec5a5caee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60212

View File

@ -1084,8 +1084,8 @@ ttyA*)
nports=`expr $i : 'ttyA\(.*\)$'`
port=1
while [ $port -le $nports ]; do
minor=`expr $port - 1`
name=`expr $port + 1000 | cut -c 3-4`
minor=$(expr $port - 1)
name=$(printf %02d $port)
mknod ttyA$name c $major $minor
mknod ttyiA$name c $major `expr $minor + 65536`
mknod ttylA$name c $major `expr $minor + 131072`
@ -1101,8 +1101,8 @@ cuaA*)
nports=`expr $i : 'cuaA\(.*\)$'`
port=1
while [ $port -le $nports ]; do
minor=`expr $port - 1`
name=`expr $port + 1000 | cut -c 3-4`
minor=$(expr $port - 1)
name=$(printf %02d $port)
mknod cuaA$name c $major `expr $minor + 128` uucp:dialer
mknod cuaiA$name c $major `expr $minor + 128 + 65536` \
uucp:dialer