Clean up a lot... Add ttye, adb, lkm and some other misc.
This commit is contained in:
parent
c4f8cbc8b8
commit
6c04166c7a
|
@ -20,7 +20,7 @@
|
|||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# from: @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
|
||||
# $Id: MAKEDEV,v 1.5 1994/05/05 03:48:52 briggs Exp $
|
||||
# $Id: MAKEDEV,v 1.6 1994/08/03 02:28:35 briggs Exp $
|
||||
#
|
||||
# Device "make" file. Valid arguments:
|
||||
# std standard devices
|
||||
|
@ -36,6 +36,7 @@
|
|||
# ch* SCSI changers
|
||||
#
|
||||
# Terminal ports:
|
||||
# ttye* ite consoles
|
||||
# tty* standard built-in serial ports (2)
|
||||
#
|
||||
# Pseudo terminals:
|
||||
|
@ -55,20 +56,20 @@ do
|
|||
case $i in
|
||||
|
||||
std)
|
||||
rm -f console drum mem kmem null tty klog stdin stdout stderr con?
|
||||
rm -f console drum kmem mem reload zero null tty
|
||||
rm -f klog stdin stdout stderr
|
||||
mknod console c 0 0
|
||||
mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum
|
||||
mknod kmem c 2 1 ; chmod 640 kmem ; chgrp kmem kmem
|
||||
mknod mem c 2 0 ; chmod 640 mem ; chgrp kmem mem
|
||||
mknod reload c 2 20 ; chmod 640 mem ; chgrp kmem mem
|
||||
mknod zero c 2 12 ; chmod 666 zero
|
||||
mknod null c 2 2 ; chmod 666 null
|
||||
mknod tty c 1 0 ; chmod 666 tty
|
||||
mknod klog c 6 0 ; chmod 600 klog
|
||||
mknod stdin c 21 0 ; chmod 666 stdin
|
||||
mknod stdout c 21 1 ; chmod 666 stdout
|
||||
mknod stderr c 21 2 ; chmod 666 stderr
|
||||
for i in 1 2 3 4 5 6 7 8 9 ; do
|
||||
mknod con$i c 0 `expr $i - 1`
|
||||
done
|
||||
rm -f fd/*
|
||||
mkdir fd > /dev/null 2>&1
|
||||
(cd fd && eval `echo "" | awk ' BEGIN { \
|
||||
|
@ -80,9 +81,10 @@ std)
|
|||
;;
|
||||
|
||||
sd*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
umask 2 ; unit=`expr $i : '.*[^0-9]\([0-9]*\)'`
|
||||
case $i in
|
||||
sd*) name=sd; blk=4; chr=13;;
|
||||
# vnd*) name=vnd; blk=8; chr=19;;
|
||||
esac
|
||||
rm -f $name$unit? r$name$unit?
|
||||
case $unit in
|
||||
|
@ -113,11 +115,32 @@ sd*)
|
|||
umask 77
|
||||
;;
|
||||
|
||||
tty*)
|
||||
unit=`expr $i : 'tty\(.*\)'`
|
||||
rm -f tty$unit
|
||||
mknod tty$unit c 12 $unit
|
||||
chown uucp.wheel tty$unit
|
||||
tty0*)
|
||||
unit=`expr $i : 'tty0\(.*\)'`
|
||||
rm -f ser${unit} tty${unit}
|
||||
case ${unit} in
|
||||
0|1)
|
||||
mknod tty${unit} c 12 ${unit}
|
||||
chown uucp.wheel tty${unit}
|
||||
;;
|
||||
*)
|
||||
echo bad unit for serial tty in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
ttye*)
|
||||
unit=`expr $i : 'ttye\(.*\)'`
|
||||
rm -f ttye${unit}
|
||||
rm -f ite*
|
||||
case $unit in
|
||||
0|1)
|
||||
mknod ttye${unit} c 11 ${unit}
|
||||
;;
|
||||
*)
|
||||
echo bad unit for ttye in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
pty*)
|
||||
|
@ -136,13 +159,10 @@ pty*)
|
|||
umask 0
|
||||
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); }'`
|
||||
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); }'`
|
||||
umask 77
|
||||
if [ $class = 1 ]; then
|
||||
mv ttyqf ttyv0; mv ptyqf ptyv0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -223,14 +243,42 @@ cd*)
|
|||
|
||||
grf*)
|
||||
unit=`expr $i : 'grf\(.*\)'`
|
||||
rm -f grf$unit
|
||||
mknod grf$unit c 10 $unit
|
||||
rm -f grf${unit}
|
||||
case ${unit} in
|
||||
0|1)
|
||||
mknod grf${unit} c 10 ${unit} ; chmod 666 grf${unit}
|
||||
;;
|
||||
*)
|
||||
echo bad unit for grf in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
adb*)
|
||||
unit=`expr $i : 'adb\(.*\)'`
|
||||
rm -f adb${unit}
|
||||
case ${unit} in
|
||||
0|1)
|
||||
mknod adb${unit} c 23 ${unit} ; chmod 666 adb${unit}
|
||||
;;
|
||||
*)
|
||||
echo bad unit for adb in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
bpf*)
|
||||
unit=`expr $i : 'bpf\(.*\)'`
|
||||
rm -f bpf$unit
|
||||
mknod bpf$unit c 22 $unit
|
||||
rm -f bpf${unit}
|
||||
mknod bpf${unit} c 22 ${unit}
|
||||
chown root.wheel bpf${unit}
|
||||
;;
|
||||
|
||||
lkm)
|
||||
rm -f lkm
|
||||
mknod lkm c 25 0
|
||||
chown root.kmem lkm
|
||||
chmod 640 lkm
|
||||
;;
|
||||
|
||||
local)
|
||||
|
@ -238,5 +286,7 @@ local)
|
|||
sh MAKEDEV.local
|
||||
;;
|
||||
|
||||
*)
|
||||
echo $i: unknown device
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue