Browse Source

use awk instead of newish sh features

OPENBSD_2_0
deraadt 29 years ago
parent
commit
da2c46d0d9
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      src/etc/etc.mvme68k/MAKEDEV

+ 6
- 8
src/etc/etc.mvme68k/MAKEDEV View File

@ -31,7 +31,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
# $Id: MAKEDEV,v 1.3 1995/11/07 22:50:58 deraadt Exp $
# $Id: MAKEDEV,v 1.4 1995/11/16 02:54:44 deraadt Exp $
# #
# Device "make" file. Valid arguments: # Device "make" file. Valid arguments:
# all makes all known devices, including local devices, # all makes all known devices, including local devices,
@ -286,13 +286,11 @@ pty*)
case $class in case $class in
0|1|2|3|4) 0|1|2|3|4)
umask 0 umask 0
(i=0; while [ $i -lt 16 ]; do
eval `printf "rm -f tty%s%x; mknod tty%s%x c 4 %d; \
rm -f pty%s%x; mknod pty%s%x c 5 %d" $name $i \
$name $i $offset $name $i $name $i $offset`
offset=$(($offset+1))
i=$(($i+1))
done)
eval `echo $offset $name | awk ' { b=$1; n=$2 } END {
for (i = 0; i < 16; i++)
printf("mknod tty%s%x c 4 %d; \
mknod pty%s%x c 5 %d; ", \
n, i, b+i, n, i, b+i); }'`
umask 77 umask 77
;; ;;
esac esac


Loading…
Cancel
Save