* use $0 instead of MAKEDEV

* remove superfluous umasks
* st* perms are 660 not 640
* ensure md0 and rfd0c get the correct perms
* add enss* to ss*
This commit is contained in:
lukem 1997-08-22 10:55:18 +00:00
parent 3e16910ca2
commit 1d665a7616
1 changed files with 23 additions and 28 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.21 1997/08/01 19:38:42 leo Exp $
# $NetBSD: MAKEDEV,v 1.22 1997/08/22 10:55:18 lukem Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -94,19 +94,19 @@ for i
do
case $i in
all)
sh MAKEDEV std fd st0 ttye0 ttye1 ttye2 ttye3 ttye4 ttye5 grf0 grf1
sh MAKEDEV grf2 grf3 grf4 grf5 mouse0 mouse1 rtc
sh MAKEDEV kbd sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 sd9 vnd0 vnd1 vnd2
sh MAKEDEV vnd3 vnd4 view00 view01 view02 view03 view04 view05 pty0
sh MAKEDEV vnd5 vnd6 cd0 fd0 fd1 fd2 fd3 bpf0 bpf1 bpf2 bpf3 ipl
sh MAKEDEV ccd0 ccd1 ccd2 ccd3
sh MAKEDEV ss0 ch0 uk0 uk1 wd0 wd1
sh MAKEDEV tun0 tun1 lkm ser02 mdm01 mdm02 lpt0 local
sh $0 std fd st0 ttye0 ttye1 ttye2 ttye3 ttye4 ttye5 grf0 grf1
sh $0 grf2 grf3 grf4 grf5 mouse0 mouse1 rtc
sh $0 kbd sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7 sd8 sd9 vnd0 vnd1 vnd2
sh $0 vnd3 vnd4 view00 view01 view02 view03 view04 view05 pty0
sh $0 vnd5 vnd6 cd0 fd0 fd1 fd2 fd3 bpf0 bpf1 bpf2 bpf3 ipl
sh $0 ccd0 ccd1 ccd2 ccd3
sh $0 ss0 ch0 uk0 uk1 wd0 wd1
sh $0 tun0 tun1 lkm ser02 mdm01 mdm02 lpt0 local
;;
floppy)
sh MAKEDEV std st0 ttye0 ttye1 ttye2 grf0 grf1 grf2 kbd tun0 tun1
sh MAKEDEV sd0 sd1 sd2 sd3 sd4 wd0 wd1 cd0 fd0 md0 md1 rtc
sh $0 std st0 ttye0 ttye1 ttye2 grf0 grf1 grf2 kbd tun0 tun1
sh $0 sd0 sd1 sd2 sd3 sd4 wd0 wd1 cd0 fd0 md0 md1 rtc
;;
std)
@ -159,7 +159,6 @@ mdm02)
;;
st*)
umask 2
case $i in
st*) name=st; unit=${i#st}; blk=5; chr=10;;
esac
@ -179,7 +178,7 @@ st*)
e$name$unit en$name$unit \
r${name}${unit} nr${name}${unit} \
er${name}${unit} enr${name}${unit}
chmod 640 ${name}${unit} n${name}${unit} \
chmod 660 ${name}${unit} n${name}${unit} \
e$name$unit en$name$unit \
r${name}${unit} nr${name}${unit} \
er${name}${unit} enr${name}${unit}
@ -188,11 +187,10 @@ st*)
echo bad unit for tape in: $i
;;
esac
umask 77
;;
fd*)
umask 2; name=fd; unit=${i#fd}
unit=${i#fd}
rm -f fd$unit? rfd$unit?
case $unit in
0|1|2|3)
@ -204,36 +202,36 @@ fd*)
mknod rfd${unit}a c 16 $(($unit * 16 + 1))
mknod rfd${unit}b c 16 $(($unit * 16 + 2))
mknod rfd${unit}c c 16 $(($unit * 16 + 3))
chgrp operator fd$unit fd$unit? rfd$unit?
chmod 640 fd$unit fd$unit? rfd$unit?
chgrp operator fd$unit fd$unit? rfd$unit rfd$unit?
chmod 640 fd$unit fd$unit? rfd$unit rfd$unit?
;;
*)
echo bad unit for floppy disk in: $i
;;
esac
umask 77
;;
md*) # Memory disk, only useful for boot-floppy
unit=${i#md}
umask 2; rm -f md${unit}
rm -f md${unit}
mknod md${unit} b 1 $(($unit * 16))
umask 77
chgrp operator md$unit
chmod 640 md$unit
;;
ss*) # SCSI changer
case $i in
ss*) name=ss; unit=${i#ss} chr=32;;
esac
rm -f $name$unit n$name$unit
rm -f $name$unit n$name$unit en$name$unit
mknod ${name}${unit} c $chr $(($unit * 16 + 0))
mknod n${name}${unit} c $chr $(($unit * 16 + 1))
chgrp operator ${name}${unit} n${name}${unit}
chmod 640 ${name}${unit} n${name}${unit}
mknod en${name}${unit} c $chr $(($unit * 16 + 3))
chgrp operator ${name}${unit} n${name}${unit} en${name}${unit}
chmod 640 ${name}${unit} n${name}${unit} en${name}${unit}
;;
sd*|vnd*|ccd*|wd*)
umask 2
case $i in
sd*) name=sd; unit=${i#sd}; blk=4; chr=8;;
vnd*) name=vnd; unit=${i#vnd}; blk=0; chr=17;;
@ -284,7 +282,6 @@ sd*|vnd*|ccd*|wd*)
echo bad unit for disk in: $i
;;
esac
umask 77
;;
ch*|uk*)
@ -299,7 +296,6 @@ ch*|uk*)
;;
cd*)
umask 2;
case $i in
cd*) name=cd; unit=${i#cd}; blk=6; chr=9;;
esac
@ -316,7 +312,6 @@ cd*)
echo bad unit for disk in: $i
;;
esac
umask 77
;;
ttye*)
@ -470,7 +465,7 @@ ipl)
local)
umask 0
sh MAKEDEV.local all
sh $0.local all
umask 77
;;