Browse Source

no awk

OPENBSD_2_1
deraadt 27 years ago
parent
commit
210b686cc2
1 changed files with 13 additions and 9 deletions
  1. +13
    -9
      src/etc/etc.powerpc/MAKEDEV

+ 13
- 9
src/etc/etc.powerpc/MAKEDEV View File

@ -1,4 +1,5 @@
#!/bin/sh - #!/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. # Copyright (c) 1990 The Regents of the University of California.
# All rights reserved. # All rights reserved.
@ -107,10 +108,9 @@ std)
fd) fd)
rm -f fd/* rm -f fd/*
mkdir fd > /dev/null 2>&1 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 555 fd
chmod 666 fd/* chmod 666 fd/*
;; ;;
@ -209,11 +209,15 @@ pty*)
case $class in case $class in
0|1|2|3|4) 0|1|2|3|4)
umask 0 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 umask 77
;; ;;
esac esac


Loading…
Cancel
Save