diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-11 02:14:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-11 02:14:06 +0000 |
commit | bd56e507d9e779beeaa58ad67f4731412974af79 (patch) | |
tree | 66dc5a05f904509805828221e9994251c44fb9a1 /etc/etc.powerpc/MAKEDEV | |
parent | 3df630426365d15dff5496bc87a18d74f5cc2dd2 (diff) |
no awk
Diffstat (limited to 'etc/etc.powerpc/MAKEDEV')
-rw-r--r-- | etc/etc.powerpc/MAKEDEV | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/etc/etc.powerpc/MAKEDEV b/etc/etc.powerpc/MAKEDEV index 5107078f3e0..b66b8d1fab4 100644 --- a/etc/etc.powerpc/MAKEDEV +++ b/etc/etc.powerpc/MAKEDEV @@ -1,4 +1,5 @@ #!/bin/sh - +# $OpenBSD: MAKEDEV,v 1.7 1997/05/11 02:14:05 deraadt Exp $ # # Copyright (c) 1990 The Regents of the University of California. # All rights reserved. @@ -107,10 +108,9 @@ 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 21 %d;", i, i)}'`) - chown -R bin.bin fd + n=0 + (cd fd && while [ $n -lt 64 ]; do mknod $n c 21 $n; n="$(( $n + 1 ))"; done) + chown -R root.wheel fd chmod 555 fd chmod 666 fd/* ;; @@ -209,11 +209,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 4 "$(( $offset + $n ))" + mknod pty$nam c 5 "$(( $offset + $n ))" + n="$(( $n + 1 ))" + done umask 77 ;; esac |