mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-25 03:54:17 +01:00
Remove /dev/ from socksys link again.
Move `Individual slices' case earlier so that it can be used to handle sliced floppies. Remove superfluous `chmod 600's. Fix formatting of device list. Don't group setting of umasks with setting of units. Remove superfluous trailing semicolons.
This commit is contained in:
parent
4ce7d32178
commit
d10b6048eb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9756
162
etc/MAKEDEV
162
etc/MAKEDEV
@ -66,12 +66,10 @@
|
||||
# Printers:
|
||||
# lpt* stock lp
|
||||
#
|
||||
# Call units:
|
||||
#
|
||||
# SCSI devices (other than CD-ROM, tape and disk)
|
||||
# uk* "unknown" device (supports ioctl calls only)
|
||||
# worm* WORM driver
|
||||
# pt* Processor Type (HP scanner, as one example)
|
||||
# SCSI devices (other than CD-ROM, tape and disk):
|
||||
# uk* "unknown" device (supports ioctl calls only)
|
||||
# worm* WORM driver
|
||||
# pt* Processor Type (HP scanner, as one example)
|
||||
#
|
||||
# Special purpose devices:
|
||||
# bpf* packet filter
|
||||
@ -86,9 +84,9 @@
|
||||
# tun Tunneling IP device
|
||||
# spigot Video Spigot video aquisition card
|
||||
# isdn* ISDN devices
|
||||
# labpc* National Instrument's Lab-PC and LAB-PC+
|
||||
# labpc* National Instrument's Lab-PC and LAB-PC+
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.96 1995/07/21 13:02:13 jkh Exp $
|
||||
# $Id: MAKEDEV,v 1.97 1995/07/29 00:40:40 jkh Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
|
||||
@ -202,7 +200,8 @@ mach-4)
|
||||
|
||||
# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
|
||||
wt*)
|
||||
umask 7 ; u=`expr $i : '..\(.*\)'`
|
||||
umask 7
|
||||
u=`expr $i : '..\(.*\)'`
|
||||
if [ x$u = x ]; then u=0; fi
|
||||
rm -f r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
|
||||
mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
|
||||
@ -223,9 +222,68 @@ wt*)
|
||||
umask 77
|
||||
;;
|
||||
|
||||
# Individual slices.
|
||||
sd*s*|vn*s*|wd*s*)
|
||||
umask 37
|
||||
case $i in
|
||||
sd*s*) name=sd; blk=4; chr=13;;
|
||||
wd*s*) name=wd; blk=0; chr=3;;
|
||||
vn*s*) name=vn; blk=15; chr=43;;
|
||||
esac
|
||||
unit=`expr $i : '..\([0-9]*\)s'`
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
slice=$(($slice+1))
|
||||
slicename=`dkitos $slice`
|
||||
rm -f $name$unit$slicename* r$name$unit$slicename*
|
||||
minor=`dkminor 0 $unit $slice $dkrawpart`
|
||||
mknod $name$unit$slicename b $blk $minor
|
||||
mknod r$name$unit$slicename c $chr $minor
|
||||
case $part in
|
||||
[a-h])
|
||||
case $oldslice in
|
||||
0) slice=$oldslice ;;
|
||||
esac
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
minor=`dkminor 0 $unit $slice $part`
|
||||
partname=`dkitop $part`
|
||||
mknod $name$unit$slicename$partname \
|
||||
b $blk $minor
|
||||
mknod r$name$unit$slicename$partname \
|
||||
c $chr $minor
|
||||
done
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
echo bad partition for disk in: $i
|
||||
;;
|
||||
esac
|
||||
chgrp operator $name$unit$slicename* \
|
||||
r$name$unit$slicename*
|
||||
;;
|
||||
*)
|
||||
echo bad slice for disk in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
|
||||
;;
|
||||
esac
|
||||
umask 77
|
||||
;;
|
||||
|
||||
fd*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
name=fd; blk=2; chr=9;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
name=fd; blk=2; chr=9
|
||||
rm -f $name$unit* r$name$unit*
|
||||
case $unit in
|
||||
0|1|2|3)
|
||||
@ -309,8 +367,9 @@ fd*)
|
||||
|
||||
|
||||
ft*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
name=ft; blk=2; chr=9;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
name=ft; blk=2; chr=9
|
||||
rm -f $name$unit* r$name$unit*
|
||||
case $unit in
|
||||
0|1|2|3)
|
||||
@ -328,64 +387,6 @@ ft*)
|
||||
umask 77
|
||||
;;
|
||||
|
||||
# Individual slices.
|
||||
sd*s*|vn*s*|wd*s*)
|
||||
umask 37
|
||||
case $i in
|
||||
sd*s*) name=sd; blk=4; chr=13;;
|
||||
wd*s*) name=wd; blk=0; chr=3;;
|
||||
vn*s*) name=vn; blk=15; chr=43;;
|
||||
esac
|
||||
unit=`expr $i : '..\([0-9]*\)s'`
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
slice=$(($slice+1))
|
||||
slicename=`dkitos $slice`
|
||||
rm -f $name$unit$slicename* r$name$unit$slicename*
|
||||
minor=`dkminor 0 $unit $slice $dkrawpart`
|
||||
mknod $name$unit$slicename b $blk $minor
|
||||
mknod r$name$unit$slicename c $chr $minor
|
||||
case $part in
|
||||
[a-h])
|
||||
case $oldslice in
|
||||
0) slice=$oldslice ;;
|
||||
esac
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
minor=`dkminor 0 $unit $slice $part`
|
||||
partname=`dkitop $part`
|
||||
mknod $name$unit$slicename$partname \
|
||||
b $blk $minor
|
||||
mknod r$name$unit$slicename$partname \
|
||||
c $chr $minor
|
||||
done
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
echo bad partition for disk in: $i
|
||||
;;
|
||||
esac
|
||||
chgrp operator $name$unit$slicename* \
|
||||
r$name$unit$slicename*
|
||||
;;
|
||||
*)
|
||||
echo bad slice for disk in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
|
||||
;;
|
||||
esac
|
||||
umask 77
|
||||
;;
|
||||
|
||||
sd*|vn*|wd*)
|
||||
umask 37
|
||||
case $i in
|
||||
@ -488,8 +489,9 @@ pty*)
|
||||
;;
|
||||
|
||||
st*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
chr=14;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
chr=14
|
||||
|
||||
#remove old stype names
|
||||
rm -f [hml]rst[0123456] [hml][en]rst[0123456] [hml]enrst[0123456]
|
||||
@ -532,7 +534,8 @@ st*)
|
||||
;;
|
||||
|
||||
ch*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
case $i in
|
||||
ch*) name=ch; chr=17;;
|
||||
esac
|
||||
@ -554,7 +557,7 @@ ch*)
|
||||
;;
|
||||
|
||||
cd*|mcd*|scd*)
|
||||
umask 2 ;
|
||||
umask 2
|
||||
case $i in
|
||||
cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
|
||||
mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
|
||||
@ -585,7 +588,7 @@ cd*|mcd*|scd*)
|
||||
;;
|
||||
|
||||
matcd*)
|
||||
umask 2 ;
|
||||
umask 2
|
||||
case $i in
|
||||
matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
|
||||
esac
|
||||
@ -757,7 +760,7 @@ socksys)
|
||||
rm -f socksys nfsd spx
|
||||
mknod socksys c 41 0
|
||||
mknod spx c 41 1
|
||||
ln -s /dev/socksys /dev/nfsd
|
||||
ln -s socksys nfsd
|
||||
chown root.wheel socksys nfsd spx
|
||||
chmod 666 socksys nfsd spx
|
||||
;;
|
||||
@ -891,7 +894,6 @@ snp?)
|
||||
rm -f snp$unit
|
||||
mknod snp$unit c 53 $unit
|
||||
chown root.wheel snp$unit
|
||||
chmod 600 snp$unit
|
||||
;;
|
||||
|
||||
# Valid arguments to isdn:
|
||||
@ -922,23 +924,19 @@ isdn*)
|
||||
mknod itel00 c `expr $unit + 3` 0
|
||||
mknod itel01 c `expr $unit + 3` 1
|
||||
mknod ispy c `expr $unit + 5` 0
|
||||
chmod 600 n8ic0 n9ic0 snic0 isdn isdn? ity?? itel?? ispy
|
||||
chown root.wheel n8ic0 n9ic0 snic0 isdn isdn? ity?? itel?? ispy
|
||||
chown uucp.wheel ityo[01]
|
||||
case $type in
|
||||
5000)
|
||||
ln snic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
3008)
|
||||
ln n8ic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
3009)
|
||||
ln n9ic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
1000|tel*|TEL*|none)
|
||||
|
@ -66,12 +66,10 @@
|
||||
# Printers:
|
||||
# lpt* stock lp
|
||||
#
|
||||
# Call units:
|
||||
#
|
||||
# SCSI devices (other than CD-ROM, tape and disk)
|
||||
# uk* "unknown" device (supports ioctl calls only)
|
||||
# worm* WORM driver
|
||||
# pt* Processor Type (HP scanner, as one example)
|
||||
# SCSI devices (other than CD-ROM, tape and disk):
|
||||
# uk* "unknown" device (supports ioctl calls only)
|
||||
# worm* WORM driver
|
||||
# pt* Processor Type (HP scanner, as one example)
|
||||
#
|
||||
# Special purpose devices:
|
||||
# bpf* packet filter
|
||||
@ -86,9 +84,9 @@
|
||||
# tun Tunneling IP device
|
||||
# spigot Video Spigot video aquisition card
|
||||
# isdn* ISDN devices
|
||||
# labpc* National Instrument's Lab-PC and LAB-PC+
|
||||
# labpc* National Instrument's Lab-PC and LAB-PC+
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.96 1995/07/21 13:02:13 jkh Exp $
|
||||
# $Id: MAKEDEV,v 1.97 1995/07/29 00:40:40 jkh Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
|
||||
@ -202,7 +200,8 @@ mach-4)
|
||||
|
||||
# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
|
||||
wt*)
|
||||
umask 7 ; u=`expr $i : '..\(.*\)'`
|
||||
umask 7
|
||||
u=`expr $i : '..\(.*\)'`
|
||||
if [ x$u = x ]; then u=0; fi
|
||||
rm -f r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
|
||||
mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
|
||||
@ -223,9 +222,68 @@ wt*)
|
||||
umask 77
|
||||
;;
|
||||
|
||||
# Individual slices.
|
||||
sd*s*|vn*s*|wd*s*)
|
||||
umask 37
|
||||
case $i in
|
||||
sd*s*) name=sd; blk=4; chr=13;;
|
||||
wd*s*) name=wd; blk=0; chr=3;;
|
||||
vn*s*) name=vn; blk=15; chr=43;;
|
||||
esac
|
||||
unit=`expr $i : '..\([0-9]*\)s'`
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
slice=$(($slice+1))
|
||||
slicename=`dkitos $slice`
|
||||
rm -f $name$unit$slicename* r$name$unit$slicename*
|
||||
minor=`dkminor 0 $unit $slice $dkrawpart`
|
||||
mknod $name$unit$slicename b $blk $minor
|
||||
mknod r$name$unit$slicename c $chr $minor
|
||||
case $part in
|
||||
[a-h])
|
||||
case $oldslice in
|
||||
0) slice=$oldslice ;;
|
||||
esac
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
minor=`dkminor 0 $unit $slice $part`
|
||||
partname=`dkitop $part`
|
||||
mknod $name$unit$slicename$partname \
|
||||
b $blk $minor
|
||||
mknod r$name$unit$slicename$partname \
|
||||
c $chr $minor
|
||||
done
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
echo bad partition for disk in: $i
|
||||
;;
|
||||
esac
|
||||
chgrp operator $name$unit$slicename* \
|
||||
r$name$unit$slicename*
|
||||
;;
|
||||
*)
|
||||
echo bad slice for disk in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
|
||||
;;
|
||||
esac
|
||||
umask 77
|
||||
;;
|
||||
|
||||
fd*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
name=fd; blk=2; chr=9;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
name=fd; blk=2; chr=9
|
||||
rm -f $name$unit* r$name$unit*
|
||||
case $unit in
|
||||
0|1|2|3)
|
||||
@ -309,8 +367,9 @@ fd*)
|
||||
|
||||
|
||||
ft*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
name=ft; blk=2; chr=9;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
name=ft; blk=2; chr=9
|
||||
rm -f $name$unit* r$name$unit*
|
||||
case $unit in
|
||||
0|1|2|3)
|
||||
@ -328,64 +387,6 @@ ft*)
|
||||
umask 77
|
||||
;;
|
||||
|
||||
# Individual slices.
|
||||
sd*s*|vn*s*|wd*s*)
|
||||
umask 37
|
||||
case $i in
|
||||
sd*s*) name=sd; blk=4; chr=13;;
|
||||
wd*s*) name=wd; blk=0; chr=3;;
|
||||
vn*s*) name=vn; blk=15; chr=43;;
|
||||
esac
|
||||
unit=`expr $i : '..\([0-9]*\)s'`
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
slice=$(($slice+1))
|
||||
slicename=`dkitos $slice`
|
||||
rm -f $name$unit$slicename* r$name$unit$slicename*
|
||||
minor=`dkminor 0 $unit $slice $dkrawpart`
|
||||
mknod $name$unit$slicename b $blk $minor
|
||||
mknod r$name$unit$slicename c $chr $minor
|
||||
case $part in
|
||||
[a-h])
|
||||
case $oldslice in
|
||||
0) slice=$oldslice ;;
|
||||
esac
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
minor=`dkminor 0 $unit $slice $part`
|
||||
partname=`dkitop $part`
|
||||
mknod $name$unit$slicename$partname \
|
||||
b $blk $minor
|
||||
mknod r$name$unit$slicename$partname \
|
||||
c $chr $minor
|
||||
done
|
||||
;;
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
echo bad partition for disk in: $i
|
||||
;;
|
||||
esac
|
||||
chgrp operator $name$unit$slicename* \
|
||||
r$name$unit$slicename*
|
||||
;;
|
||||
*)
|
||||
echo bad slice for disk in: $i
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
|
||||
;;
|
||||
esac
|
||||
umask 77
|
||||
;;
|
||||
|
||||
sd*|vn*|wd*)
|
||||
umask 37
|
||||
case $i in
|
||||
@ -488,8 +489,9 @@ pty*)
|
||||
;;
|
||||
|
||||
st*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
chr=14;
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
chr=14
|
||||
|
||||
#remove old stype names
|
||||
rm -f [hml]rst[0123456] [hml][en]rst[0123456] [hml]enrst[0123456]
|
||||
@ -532,7 +534,8 @@ st*)
|
||||
;;
|
||||
|
||||
ch*)
|
||||
umask 2 ; unit=`expr $i : '..\(.*\)'`
|
||||
umask 2
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
case $i in
|
||||
ch*) name=ch; chr=17;;
|
||||
esac
|
||||
@ -554,7 +557,7 @@ ch*)
|
||||
;;
|
||||
|
||||
cd*|mcd*|scd*)
|
||||
umask 2 ;
|
||||
umask 2
|
||||
case $i in
|
||||
cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
|
||||
mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
|
||||
@ -585,7 +588,7 @@ cd*|mcd*|scd*)
|
||||
;;
|
||||
|
||||
matcd*)
|
||||
umask 2 ;
|
||||
umask 2
|
||||
case $i in
|
||||
matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
|
||||
esac
|
||||
@ -757,7 +760,7 @@ socksys)
|
||||
rm -f socksys nfsd spx
|
||||
mknod socksys c 41 0
|
||||
mknod spx c 41 1
|
||||
ln -s /dev/socksys /dev/nfsd
|
||||
ln -s socksys nfsd
|
||||
chown root.wheel socksys nfsd spx
|
||||
chmod 666 socksys nfsd spx
|
||||
;;
|
||||
@ -891,7 +894,6 @@ snp?)
|
||||
rm -f snp$unit
|
||||
mknod snp$unit c 53 $unit
|
||||
chown root.wheel snp$unit
|
||||
chmod 600 snp$unit
|
||||
;;
|
||||
|
||||
# Valid arguments to isdn:
|
||||
@ -922,23 +924,19 @@ isdn*)
|
||||
mknod itel00 c `expr $unit + 3` 0
|
||||
mknod itel01 c `expr $unit + 3` 1
|
||||
mknod ispy c `expr $unit + 5` 0
|
||||
chmod 600 n8ic0 n9ic0 snic0 isdn isdn? ity?? itel?? ispy
|
||||
chown root.wheel n8ic0 n9ic0 snic0 isdn isdn? ity?? itel?? ispy
|
||||
chown uucp.wheel ityo[01]
|
||||
case $type in
|
||||
5000)
|
||||
ln snic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
3008)
|
||||
ln n8ic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
3009)
|
||||
ln n9ic0 nic0
|
||||
chmod 600 nic0
|
||||
chown root.wheel nic0
|
||||
;;
|
||||
1000|tel*|TEL*|none)
|
||||
|
Loading…
Reference in New Issue
Block a user