diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-10 23:01:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-10 23:01:48 +0000 |
commit | f36e8e4b5125ccc30ac48304f8688968f643dc7d (patch) | |
tree | 820f66fff8992c4631603d8c8b7a846e8c9f1540 | |
parent | 0423a8154b69e457ae43585dc33ddb7bba830bcc (diff) |
Don't use awk (awk-less bits taken from i386 MAKEDEV)
-rw-r--r-- | etc/etc.alpha/MAKEDEV | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/etc/etc.alpha/MAKEDEV b/etc/etc.alpha/MAKEDEV index bf2dfd9584d..3ff60cf4db4 100644 --- a/etc/etc.alpha/MAKEDEV +++ b/etc/etc.alpha/MAKEDEV @@ -1,5 +1,5 @@ #!/bin/sh - -# $OpenBSD: MAKEDEV,v 1.15 1997/05/07 12:52:22 niklas Exp $ +# $OpenBSD: MAKEDEV,v 1.16 1997/05/10 23:01:47 millert Exp $ # $NetBSD: MAKEDEV,v 1.8.4.1 1996/06/18 00:41:56 cgd Exp $ # # Copyright (c) 1990 The Regents of the University of California. @@ -116,9 +116,8 @@ std) fd) rm -f fd/* mkdir fd > /dev/null 2>&1 - (cd fd && eval `echo "" | awk ' BEGIN { \ - for (i = 0; i < 64; i++) \ - printf("mknod %d c 10 %d;", i, i)}'`) + n=0 + (cd fd && while [ $n -lt 64 ]; do mknod $n c 24 $n; n="$(( $n + 1 ))"; done) chown -R root.wheel fd chmod 555 fd chmod 666 fd/* @@ -223,11 +222,15 @@ pty*) case $class in 0|1|2|3|4) umask 0 - eval `echo $offset $name | awk ' { b=$1; n=$2 } END { - for (i = 0; i < 16; i++) - 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; ", \ - n, i, n, i, b+i, n, i, n, i, b+i); }'` + n=0 + while [ $n -lt 16 ] + do + nam=$name`hex $n` + rm -rf {tty,pty}$n + mknod tty$nam c 5 "$(( $offset + $n ))" + mknod pty$nam c 6 "$(( $offset + $n ))" + n="$(( $n + 1 ))" + done umask 77 if [ $class = 1 ]; then mv ttyqf ttyv0; mv ptyqf ptyv0 |