|
@ -1,6 +1,6 @@ |
|
|
#!/bin/sh - |
|
|
#!/bin/sh - |
|
|
# |
|
|
# |
|
|
# $OpenBSD: MAKEDEV,v 1.1 2001/09/04 16:15:05 todd Exp $ |
|
|
|
|
|
|
|
|
# $OpenBSD: MAKEDEV,v 1.2 2001/09/04 17:53:16 todd Exp $ |
|
|
# |
|
|
# |
|
|
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org> |
|
|
# Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org> |
|
|
# All rights reserved. |
|
|
# All rights reserved. |
|
@ -67,7 +67,7 @@ |
|
|
# cgfourteen* |
|
|
# cgfourteen* |
|
|
# bpf* Berkeley Packet Filter |
|
|
# bpf* Berkeley Packet Filter |
|
|
# lkm loadable kernel modules interface |
|
|
# lkm loadable kernel modules interface |
|
|
# audio audio device |
|
|
|
|
|
|
|
|
# audio* audio device |
|
|
# tun* network tunnel driver |
|
|
# tun* network tunnel driver |
|
|
# *random inkernal random data source |
|
|
# *random inkernal random data source |
|
|
# uk* SCSI Unknown device |
|
|
# uk* SCSI Unknown device |
|
@ -77,34 +77,7 @@ |
|
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin |
|
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin |
|
|
T=$0 |
|
|
T=$0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# default shell support functions |
|
|
# default shell support functions |
|
|
# set this to echo for Echo-Only debugging |
|
|
|
|
|
eo= |
|
|
|
|
|
|
|
|
|
|
|
# M name b/c major minor [mode] [group] |
|
|
|
|
|
RMlist="rm -f" |
|
|
|
|
|
MKlist=":" |
|
|
|
|
|
mkl() { |
|
|
|
|
|
[ "${mklist[$1]}" ] && { |
|
|
|
|
|
mklist[$1]="${mklist[$1]};mknod -m $1 $2 $3 $4 $5" |
|
|
|
|
|
} || { |
|
|
|
|
|
mklist[$1]="mknod -m $1 $2 $3 $4 $5" |
|
|
|
|
|
modes="$modes $1" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
M() { |
|
|
|
|
|
RMlist="$RMlist $1" |
|
|
|
|
|
mkl ${5-666} $1 $2 $3 $4 |
|
|
|
|
|
mklist="$mklist $1" |
|
|
|
|
|
G=${6:-wheel} |
|
|
|
|
|
[ "$G" ] && { |
|
|
|
|
|
[ "$7" ] && { |
|
|
|
|
|
MKlist="$MKlist;chown $7.$G $1" |
|
|
|
|
|
} || MKlist="$MKlist;chgrp $G $1" |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
hex() |
|
|
hex() |
|
|
{ |
|
|
{ |
|
|
case $1 in |
|
|
case $1 in |
|
@ -165,6 +138,33 @@ dodisk2() |
|
|
M $1$2c b $3 $n 640 operator |
|
|
M $1$2c b $3 $n 640 operator |
|
|
M r$1$2c c $4 $n 640 operator |
|
|
M r$1$2c c $4 $n 640 operator |
|
|
} |
|
|
} |
|
|
|
|
|
# set this to echo for Echo-Only debugging |
|
|
|
|
|
[ "$eo" ] || eo= |
|
|
|
|
|
|
|
|
|
|
|
# M name b/c major minor [mode] [group] |
|
|
|
|
|
RMlist="rm -f" |
|
|
|
|
|
MKlist=":" |
|
|
|
|
|
mkl() { |
|
|
|
|
|
[ "${mklist[$1]}" ] && { |
|
|
|
|
|
mklist[$1]="${mklist[$1]};mknod -m $1 $2 $3 $4 $5" |
|
|
|
|
|
} || { |
|
|
|
|
|
mklist[$1]="mknod -m $1 $2 $3 $4 $5" |
|
|
|
|
|
modes="$modes $1" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
M() { |
|
|
|
|
|
RMlist="$RMlist $1" |
|
|
|
|
|
mkl ${5-666} $1 $2 $3 $4 |
|
|
|
|
|
mklist="$mklist $1" |
|
|
|
|
|
G=${6:-wheel} |
|
|
|
|
|
[ "$G" ] && { |
|
|
|
|
|
[ "$7" ] && { |
|
|
|
|
|
MKlist="$MKlist;chown $7.$G $1" |
|
|
|
|
|
} || MKlist="$MKlist;chgrp $G $1" |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
R() { |
|
|
R() { |
|
|
for i in "$@" |
|
|
for i in "$@" |
|
|
do |
|
|
do |
|
@ -181,7 +181,7 @@ all) |
|
|
R tun0 tun1 tun2 random ses0 uk0 uk1 ss0 ss1 |
|
|
R tun0 tun1 tun2 random ses0 uk0 uk1 ss0 ss1 |
|
|
R fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H |
|
|
R fd0 fd0B fd0C fd0D fd0E fd0F fd0G fd0H |
|
|
R fd1 fd1B fd1C fd1D fd1E fd1F fd1G fd1H |
|
|
R fd1 fd1B fd1C fd1D fd1E fd1F fd1G fd1H |
|
|
R audio local |
|
|
|
|
|
|
|
|
R lkm audio0 local |
|
|
;; |
|
|
;; |
|
|
floppy) |
|
|
floppy) |
|
|
R std fd0 wd0 wd1 sd0 sd1 |
|
|
R std fd0 wd0 wd1 sd0 sd1 |
|
@ -378,8 +378,8 @@ esac |
|
|
done |
|
|
done |
|
|
} |
|
|
} |
|
|
R "$@" |
|
|
R "$@" |
|
|
eval $RMlist |
|
|
|
|
|
|
|
|
$eo eval $RMlist |
|
|
for mode in $modes; do |
|
|
for mode in $modes; do |
|
|
eval ${mklist[$mode]} |
|
|
|
|
|
|
|
|
$eo eval ${mklist[$mode]} |
|
|
done |
|
|
done |
|
|
eval $MKlist |
|
|
|
|
|
|
|
|
$eo eval $MKlist |