coda=" root root 0600"
ipsec=" root root 0200"
readable=" root root 0444"
+ lirc=" root video 0640"
MAXVT=63
:
elif [ -d /dev/.static/dev/ ] && [ "`pwd`" = /dev ] && [ -e /proc/mounts ] \
&& grep -qE '^[^ ]+ /dev/\.static/dev' /proc/mounts; then
+ echo "udev active, devices will be created in /dev/.static/dev/"
cd /dev/.static/dev/
elif [ -d /.dev/ ] && [ "`pwd`" = /dev ] && [ -e /proc/mounts ] \
&& grep -qE '^[^ ]+ /\.dev' /proc/mounts; then
+ echo "udev active, devices will be created in /.dev/"
cd /.dev/
-elif [ -d .udevdb/ ] && [ "`pwd`" = /dev ]; then
- echo ".udevdb presence implies active udev. Aborting MAKEDEV invocation."
+elif [ -d .udevdb/ -o -d .udev/ ] && [ "`pwd`" = /dev ]; then
+ echo ".udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation."
# use exit 0, not 1, so postinst scripts don't fail on this
exit 0
fi
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
devicename () { # translate device names to something safe
- echo "$*" | sed -e 's/[^A-Za-z0-9_]/_/g'
+ # A-Z is not full alphabet in all locales (e.g. in et_EE)
+ echo "$*" | LC_ALL=C sed -e 's/[^A-Za-z0-9_]/_/g'
}
makedev () { # usage: makedev name [bcu] major minor owner group mode
fi
fi
}
+makefifo () { # usage: makefifo name owner group mode
+ if [ "$opt_v" ]
+ then if [ "$opt_d" ]
+ then echo "delete $1"
+ else echo "create $1 $2:$3 $4"
+ fi
+ fi
+ # missing parameters are a bug - bail - should we do an exit 1 here?
+ case :$1:$2:$3:$4: in
+ *::*) echo "Warning: MAKEFIFO $@ is missing parameter(s)." >&2;;
+ esac
+ if [ ! "$opt_n" ]
+ then
+ if [ "$opt_d" ]
+ then
+ rm -f $1
+ else
+ rm -f $1-
+ if mknod $1- p &&
+ chown $2:$3 $1- &&
+ chmod $4 $1- &&
+ mv $1- $1
+ then
+ : # it worked
+ else
+ # Didn't work, clean up any mess...
+ echo "makefifo $@: failed"
+ rm -f $1-
+ fi
+ fi
+ fi
+}
symlink () { # usage: symlink name target
if [ "$opt_v" ]
then if [ "$opt_d" ]
do
case "$1" in
mem|tty|ttyp|cua|cub|cui) ;;
- hd) (for d in a b c d e f g h ; do
+ hd) (for d in a b c d e f g h i j k l m n o p ; do
echo -n hd$d " "
done) ; echo
;;
ide7) echo hdo hdp ;;
ide8) echo hdq hdr ;;
ide9) echo hds hdt ;;
- sd) echo sda sdb sdc sdd ;;
+ sd) (for d in a b c d e f g h i j k l m n o p ; do
+ echo -n sd$d " "
+ done) ; echo
+ ;;
dasd) (for d in a b c d e f g h i j k l m \
n o p q r s t u v w x y z ; do
echo -n dasd$d " "
st) echo st0 ;;
xd) echo xda xdb ;;
ad) echo ada adb ;;
- fd) echo fd0 fd1 ;;
lp) echo lp ;;
mt) echo ftape ;;
qft) echo ftape ;;
bluetooth) echo bluetooth ;;
lvm) ;; # taken care of by LVM userspace tools
ramdisk) echo ram ;;
- *) echo "$0: don't know what \"$1\" is" >&2 ;;
+ null) echo std ;;
+ zero) echo std ;;
+# *) echo "$0: don't know what \"$1\" is" >&2 ;;
+ *) echo $1
esac
shift
done
}
-for arg in $*
+for arg in `cvt $*`
do
-# case `cvt $arg` in
+ # this is to make the case patterns work as expected in all locales
+ LC_ALL=C
case $arg in
generic)
# pick the right generic-<arch> using dpkg's knowledge
- case `dpkg --print-installation-architecture` in
+ case `dpkg --print-architecture` in
alpha)
$0 $opts generic-alpha
;;
- arm)
+ arm|armeb|armel)
$0 $opts generic-arm
;;
hppa)
$0 $opts generic-hppa
;;
- i386)
+ i386|lpia)
$0 $opts generic-i386
;;
amd64)
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
+ $0 $opts hd sd
$0 $opts xda xdb
- $0 $opts sda sdb sdc sdd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
+ $0 $opts hd sd
$0 $opts xda xdb
- $0 $opts sda sdb sdc sdd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
+ $0 $opts hd sd
$0 $opts xda xdb
- $0 $opts sda sdb sdc sdd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts sg
$0 $opts ada adb adc add ade adf
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
$0 $opts std
$0 $opts fd
$0 $opts fd0 fd1
- $0 $opts hda hdb hdc hdd
- $0 $opts sda sdb sdc sdd
+ $0 $opts hd sd
$0 $opts scd0 scd1
$0 $opts st0 st1
$0 $opts sg
symlink core $procfs/kcore
makedev full c 1 7 $public
makedev random c 1 8 $public
- makedev urandom c 1 9 $readable
+ makedev urandom c 1 9 $public
makedev tty c 5 0 $tty
$0 $opts ram
$0 $opts loop
makedev scc$unit c 34 $unit $system
done
;;
+ mtd)
+ for unit in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+ do
+ makedev mtd$unit c 90 `math $unit \* 2` $system
+ done
+ ;;
bc)
for unit in 0 1 2 3
do
;;
adb)
# pick the right arch device using dpkg's knowledge
- case `dpkg --print-installation-architecture` in
+ case `dpkg --print-architecture` in
powerpc)
# ADB bus devices (char)
makedev adb c 56 0 $mouse
makedev video1394/$i c 171 `math 16 + $i` $video
done
;;
+ alsa)
+ echo "You requested 'alsa' devices. Please install the alsa-base package instead,"
+ echo "which creates and maintains device information for ALSA."
+ ;;
nvram)
makedev nvram c 10 144 $mouse
;;
major=`Major $arg 10` || continue
makedev $arg c $major 183 $private
;;
+ mcelog)
+ major=`Major $arg 10` || continue
+ makedev $arg c $major 227 $private
+ ;;
cpu|microcode)
mkdir -p cpu
makedev cpu/microcode c 10 184 $private
irnet)
makedev irnet c 10 187 $system
;;
+ cbm)
+ makedev cbm c 10 177 $floppy
+ ;;
misc)
major=`Major mouse 10` || continue
makedev logibm c $major 0 $mouse
makedev mergemem c $major 153 $mouse
makedev pmu c $major 154 $mouse
;;
+ fuse)
+ makedev fuse c 10 229 $system
+ ;;
pmu)
major=`Major mouse 10` || continue
makedev pmu c $major 154 $mouse
makedev systrace c 10 226 $private
;;
uinput)
+ mkdir -p input
makedev input/uinput c 10 223 $mouse
;;
js)
base=`index ab $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major `math $base + $part` $disk
done
base=`index cd $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index ef $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index gh $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index ij $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index kl $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index mn $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index op $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index qr $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
base=`index st $unit`
base=`math $base \* 64`
makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
makedev hd$unit$part b $major $(( $base + $part )) $disk
done
;;
md)
major=`Major md 9` || continue
- for part in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+ for part in 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
do
makedev md$part b $major $part $disk
done
done
;;
pktcdvd)
- major=97
- for unit in 0 1 2 3
- do
- makedev pktcdvd$unit b $major $unit $cdrom
- done
+ echo "pktcdvd major number is now dynamic, taking no action"
+ # major=97
+ # for unit in 0 1 2 3
+ # do
+ # makedev pktcdvd$unit b $major $unit $cdrom
+ # done
;;
cfs0)
makedev cfs0 c 67 0 $coda
makedev pf$i b 47 $i $floppy
done
;;
+ lirc)
+ makedev lirc c 61 0 $lirc
+ for i in d m; do
+ makefifo lirc${i} $lirc
+ done
+ ;;
update)
devices=
if [ ! -f $procfs/devices ]