add "all" entry, and support lkm/tun/vnd drivers

This commit is contained in:
deraadt 1994-03-06 13:43:11 +00:00
parent 601bee4e1c
commit a199f44684
1 changed files with 37 additions and 6 deletions

View File

@ -57,6 +57,8 @@
# ite* terminal emulator interface to HP300 graphics devices # ite* terminal emulator interface to HP300 graphics devices
# hil HP300 HIL input devices # hil HP300 HIL input devices
# bpf* packet filter # bpf* packet filter
# tun* network tunnel driver
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin PATH=/sbin:/bin/:/usr/bin:/usr/sbin
umask 77 umask 77
@ -64,6 +66,14 @@ for i
do do
case $i in case $i in
all)
sh MAKEDEV std ct0 ct1 st0 st1 cd0 cd1 cd2 rd0 rd1 rd2
sh MAKEDEV sd0 sd1 sd2 pty0 vnd0 vnd1 vnd2 vnd3
sh MAKEDEV hil grf0 ite0 dca0 dcm0 dcm1 dcm2 dcm3
sh MAKEDEV bpf0 bpf1 bpf2 bpf3 tun0 tun1 tun2 tun3 lkm
sh MAKEDEV local
;;
std) std)
mknod console c 0 0 mknod console c 0 0
mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum mknod drum c 3 0 ; chmod 640 drum ; chgrp kmem drum
@ -126,21 +136,36 @@ bpf*)
chown root.wheel bpf$unit chown root.wheel bpf$unit
;; ;;
tun*)
unit=`expr $i : 'tun\(.*\)'`
rm -f tun$unit
mknod tun$unit c 40 $unit
chmod 600 tun$unit
chown root.wheel tun$unit
;;
vnd*)
unit=`expr $i : '...\(.*\)'`
name=vnd; blk=6; chr=19
rm -f ${name}${unit}c r${name}${unit}c
mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
chgrp operator ${name}${unit}c r${name}${unit}c
chmod 640 ${name}${unit}c r${name}${unit}c
;;
cd*|fd*|rd*|sd*) cd*|fd*|rd*|sd*)
umask 2 ; unit=`expr $i : '..\(.*\)'` umask 2 ; unit=`expr $i : '..\(.*\)'`
case $i in case $i in
rd*) name=rd; blk=2; chr=9;; rd*) name=rd; blk=2; chr=9;;
sd*) name=sd; blk=4; chr=8;; sd*) name=sd; blk=4; chr=8;;
cd*) name=cd; blk=5; chr=17;; cd*) name=cd; blk=5; chr=17;;
vnd*) name=vnd; blk=6; chr=19;;
esac esac
case $unit in case $unit in
0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|\ 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|\
17|18|19|20|21|22|23|24|25|26|27|28|29|30|31) 17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)
mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2` mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2` mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
if [ $name != cd -a $name != vnd ]
then
mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0` mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
mknod ${name}${unit}b b $blk `expr $unit '*' 8 + 1` mknod ${name}${unit}b b $blk `expr $unit '*' 8 + 1`
mknod ${name}${unit}d b $blk `expr $unit '*' 8 + 3` mknod ${name}${unit}d b $blk `expr $unit '*' 8 + 3`
@ -155,7 +180,6 @@ cd*|fd*|rd*|sd*)
mknod r${name}${unit}f c $chr `expr $unit '*' 8 + 5` mknod r${name}${unit}f c $chr `expr $unit '*' 8 + 5`
mknod r${name}${unit}g c $chr `expr $unit '*' 8 + 6` mknod r${name}${unit}g c $chr `expr $unit '*' 8 + 6`
mknod r${name}${unit}h c $chr `expr $unit '*' 8 + 7` mknod r${name}${unit}h c $chr `expr $unit '*' 8 + 7`
fi
chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h] chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h] chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
;; ;;
@ -209,7 +233,7 @@ grf*)
case $unit in case $unit in
0|1|2|3) 0|1|2|3)
mknod grf${unit} c 10 ${unit}; chmod 666 grf${unit} mknod grf${unit} c 10 ${unit}; chmod 666 grf${unit}
echo "grf${unit}: use MAKEDEV.hpux to make HP-UX names for device" # echo "grf${unit}: use MAKEDEV.hpux to make HP-UX names for device"
;; ;;
*) *)
echo bad unit for grf in: $i echo bad unit for grf in: $i
@ -247,7 +271,14 @@ hil)
ln hil3 locator ln hil3 locator
fi fi
chmod 666 hil* chmod 666 hil*
echo "hil: use MAKEDEV.hpux to make HP-UX names for devices" # echo "hil: use MAKEDEV.hpux to make HP-UX names for devices"
;;
lkm)
rm -f lkm
mknod lkm c 24 0
chown root.kmem lkm
chmod 640 lkm
;; ;;
pty*) pty*)