Browse Source

Don't use awk (awk-less bits taken from i386 MAKEDEV)

OPENBSD_2_1
millert 27 years ago
parent
commit
6d0bd3da9b
1 changed files with 12 additions and 9 deletions
  1. +12
    -9
      src/etc/etc.alpha/MAKEDEV

+ 12
- 9
src/etc/etc.alpha/MAKEDEV View File

@ -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


Loading…
Cancel
Save