diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-08-09 11:58:11 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-08-09 11:58:11 +0200 |
commit | b7299fd904d33bc2d6845be535666b528fd18948 (patch) | |
tree | 1c09f288b1b148c30b8d00c88770a0adbd691457 /etc/udev | |
parent | bfd12948927b84b3ce990403969c1d10081c1fed (diff) |
update distro rules files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'etc/udev')
-rw-r--r-- | etc/udev/debian/compat-full.rules | 37 | ||||
-rw-r--r-- | etc/udev/debian/permissions.rules | 1 | ||||
-rw-r--r-- | etc/udev/debian/persistent.rules | 49 | ||||
-rw-r--r-- | etc/udev/debian/run.rules | 1 | ||||
-rw-r--r-- | etc/udev/redhat/udev.rules | 120 |
5 files changed, 168 insertions, 40 deletions
diff --git a/etc/udev/debian/compat-full.rules b/etc/udev/debian/compat-full.rules new file mode 100644 index 0000000000..50e24bc64a --- /dev/null +++ b/etc/udev/debian/compat-full.rules @@ -0,0 +1,37 @@ +# compatibility links for a devfs-style /dev + +KERNEL=="md[0-9]*", SYMLINK+="%k" +KERNEL=="loop[0-9]*", SYMLINK+="%k" + +KERNEL=="tty[0-9]*", SYMLINK+="%k" +KERNEL=="ttyS[0-9]*", SYMLINK+="%k" +KERNEL=="ttyUSB[0-9]*", SYMLINK+="%k" + +KERNEL=="vcs", SYMLINK+="%k" +KERNEL=="vcs[0-9]*", SYMLINK+="%k" +KERNEL=="vcsa", SYMLINK+="%k" +KERNEL=="vcsa[0-9]*", SYMLINK+="%k" + +KERNEL=="video*", SYMLINK+="%k" +KERNEL=="radio*", SYMLINK+="%k" +KERNEL=="vbi*", SYMLINK+="%k" +KERNEL=="vtx*", SYMLINK+="%k" + +KERNEL=="apm_bios", SYMLINK+="%k" +KERNEL=="agpgart", SYMLINK+="%k" +KERNEL=="psaux", SYMLINK+="%k" +KERNEL=="nvram", SYMLINK+="%k" +KERNEL=="rtc", SYMLINK+="%k" +KERNEL=="ram[0-9]*", SYMLINK+="%k" + +KERNEL=="i2c-[0-9]*", SYMLINK+="%k" +KERNEL=="lp[0-9]*", SYMLINK+="%k" + +KERNEL=="audio*" SYMLINK+="%k" +KERNEL=="dsp*" SYMLINK+="%k" +KERNEL=="mixer*" SYMLINK+="%k" + +KERNEL=="fb[0-9]*", SYMLINK+="%k" +KERNEL=="fd[0-9]*", SYMLINK+="%k" +KERNEL=="js[0-9]*", SYMLINK+="%k" + diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules index aab6fdbd08..52d7aa9536 100644 --- a/etc/udev/debian/permissions.rules +++ b/etc/udev/debian/permissions.rules @@ -27,6 +27,7 @@ KERNEL=="ptmx", MODE="0666", GROUP="root" KERNEL=="console", MODE="0600", GROUP="root" KERNEL=="tty", MODE="0666", GROUP="root" KERNEL=="tty[0-9]*", GROUP="root" +KERNEL=="pty*", MODE="0666", GROUP="tty" # video devices SUBSYSTEM=="video4linux", GROUP="video" diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules new file mode 100644 index 0000000000..b444a27bf6 --- /dev/null +++ b/etc/udev/debian/persistent.rules @@ -0,0 +1,49 @@ +# This file contains the rules needed to create persistent device names. + +# we are only interested in add actions for block devices +ACTION!="add", GOTO="no_volume_id" +SUBSYSTEM!="block", GOTO="no_volume_id" + +# and we can safely ignore these kinds of devices +KERNEL=="ram*|loop*|fd*|sr*", GOTO="no_volume_id" + +# disk id +KERNEL=="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode" +KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}" + +KERNEL=="hd*[0-9]", IMPORT{parent}="ID_*" +KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n" + +KERNEL=="sd*[!0-9]", SYSFS{ieee1394_id}=="*", \ + IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394\nID_TYPE=disk'" +KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/usb_id -x" +KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", \ + IMPORT="/sbin/scsi_id -g -x -a -s %p" +KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + +KERNEL=="sd*[0-9]", IMPORT{parent}="ID_*" +KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", \ + SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" + +# path +KERNEL=="*[!0-9]", ENV{ID_TYPE}=="?*", IMPORT="/sbin/path_id %p", \ + SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}" + +KERNEL=="*[0-9]", IMPORT{parent}="ID_*" +KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \ + SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}-part%n" + +# volume label and uuid +KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="no_volume_id" +KERNEL=="*[0-9]", IMPORT="/sbin/vol_id --export $tempnode" +KERNEL=="*[0-9]", ENV{ID_FS_UUID}=="?*", \ + SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}" +KERNEL=="*[0-9]", ENV{ID_FS_LABEL_SAFE}=="?*", \ + SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}" + +# end of processing +SUBSYSTEM=="block", LABEL="no_volume_id" + diff --git a/etc/udev/debian/run.rules b/etc/udev/debian/run.rules index 0e28d189be..23fa43c051 100644 --- a/etc/udev/debian/run.rules +++ b/etc/udev/debian/run.rules @@ -3,5 +3,6 @@ KERNEL=="ptmx", OPTIONS+="last_rule" KERNEL=="console", OPTIONS+="last_rule" KERNEL=="tty" , OPTIONS+="last_rule" KERNEL=="tty[0-9]*", OPTIONS+="last_rule" +KERNEL=="pty*", OPTIONS+="last_rule" SUBSYSTEM=="vc", OPTIONS+="last_rule" diff --git a/etc/udev/redhat/udev.rules b/etc/udev/redhat/udev.rules index 5bed782280..0f6e6ffb73 100644 --- a/etc/udev/redhat/udev.rules +++ b/etc/udev/redhat/udev.rules @@ -1,7 +1,7 @@ # There are a number of modifiers that are allowed to be used in some of the # fields. See the udev man page for a full description of them. # -# default is OWNER="root" GROUP="root", MODE="0660" +# default is OWNER="root" GROUP="root", MODE="0600" # # all block devices @@ -86,14 +86,14 @@ KERNEL=="usblp*", GROUP="lp", MODE="0660" KERNEL=="usb/lp*", GROUP="lp", MODE="0660" # tape devices -KERNEL=="ht*", GROUP="disk", MODE="0640" -KERNEL=="nht*", GROUP="disk", MODE="0640" -KERNEL=="pt[0-9]*", GROUP="disk", MODE="0640" -KERNEL=="npt*", GROUP="disk", MODE="0640" -KERNEL=="st*", GROUP="disk", MODE="0640" -KERNEL=="nst*", GROUP="disk", MODE="0640" -KERNEL=="osst*", GROUP="disk", MODE="0640" -KERNEL=="nosst*", GROUP="disk", MODE="0640" +KERNEL=="ht*", GROUP="disk", MODE="0660" +KERNEL=="nht*", GROUP="disk", MODE="0660" +KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660" +KERNEL=="npt*", GROUP="disk", MODE="0660" +KERNEL=="st*", GROUP="disk", MODE="0660" +KERNEL=="nst*", GROUP="disk", MODE="0660" +KERNEL=="osst*", GROUP="disk", MODE="0660" +KERNEL=="nosst*", GROUP="disk", MODE="0660" # diskonkey devices KERNEL=="diskonkey*", GROUP="disk", MODE="0640" @@ -144,7 +144,7 @@ KERNEL=="dvb/adapter*", MODE="0660" # create a symlink named after the device map name # note devmap_name comes with extras/multipath -#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c" +#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c" # DRI devices always go into a subdirectory (as per the LSB spec) KERNEL=="card*", NAME="dri/card%n" @@ -166,37 +166,42 @@ KERNEL=="ts*", NAME="input/%k" KERNEL=="raw[0-9]*", NAME="raw/%k" -KERNEL=="lp[0-9]*", SYMLINK="par%n" +KERNEL=="lp[0-9]*", SYMLINK+="par%n" BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" KERNEL=="microcode", NAME="cpu/%k" -KERNEL=="ram1", SYMLINK="ram" -KERNEL=="video0", SYMLINK="video" -KERNEL=="radio0", SYMLINK="radio" -KERNEL=="audio0", SYMLINK="audio" -KERNEL=="dsp0", SYMLINK="dsp" -KERNEL=="fb0", SYMLINK="fb" -KERNEL=="qft0", SYMLINK="ftape" -KERNEL=="isdnctrl0", SYMLINK="isdnctrl" -KERNEL=="mixer0", SYMLINK="mixer" -KERNEL=="ram0", SYMLINK="ramdisk" -KERNEL=="sbpcd0", SYMLINK="sbpcd" -KERNEL=="radio0", SYMLINK="radio" -KERNEL=="tty0", SYMLINK="systty" -KERNEL=="vbi0", SYMLINK="vbi" -KERNEL=="null", SYMLINK="XOR" +# provide symlinks for backwards compatibility +KERNEL="msr[0-9]*", NAME="cpu/%n/msr", SYMLINK+="cpu/%k" +KERNEL="cpu[0-9]*", NAME="cpu/%n/cpu", SYMLINK+="cpu/%k", SYMLINK+="%k" + +KERNEL=="ram1", SYMLINK+="ram" +KERNEL=="video0", SYMLINK+="video" +KERNEL=="radio0", SYMLINK+="radio" +KERNEL=="audio0", SYMLINK+="audio" +KERNEL=="dsp0", SYMLINK+="dsp" +KERNEL=="fb0", SYMLINK+="fb" +KERNEL=="qft0", SYMLINK+="ftape" +KERNEL=="isdnctrl0", SYMLINK+="isdnctrl" +KERNEL=="mixer0", SYMLINK+="mixer" +KERNEL=="ram0", SYMLINK+="ramdisk" +KERNEL=="sbpcd0", SYMLINK+="sbpcd" +KERNEL=="radio0", SYMLINK+="radio" +KERNEL=="tty0", SYMLINK+="systty" +KERNEL=="vbi0", SYMLINK+="vbi" +KERNEL=="null", SYMLINK+="XOR" KERNEL=="tun", NAME="net/%k" KERNEL=="device-mapper", NAME="mapper/control" # old compat symlinks with enumeration -KERNEL=="sr[0-9]*", SYMLINK="cdrom%e" -KERNEL=="scd[0-9]*", SYMLINK="cdrom%e" -KERNEL=="pcd[0-9]*", SYMLINK="cdrom%e" -KERNEL=="fd[0-9]*", SYMLINK="floppy%e" -KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK="tape%e" -KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK="tape%e" +KERNEL=="sr[0-9]*", SYMLINK+="cdrom%e" +KERNEL=="scd[0-9]*", SYMLINK+="cdrom%e" +KERNEL=="pcd[0-9]*", SYMLINK+="cdrom%e" +KERNEL=="fd[0-9]*", SYMLINK+="floppy%e" +KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape%e", MODE="0660" +KERNEL=="sg[0-9]*", BUS="scsi", SYSFS{type}=="6", SYMLINK+="scanner%e", MODE="0660" KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" @@ -208,22 +213,57 @@ KERNEL=="zapchannel", NAME="zap/channel" KERNEL=="zappseudo", NAME="zap/pseudo" KERNEL=="zap[0-9]*", NAME="zap/%n" +BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="6", NAME="%k", SYMLINK="scanner%e", MODE="0660" + # do not seperate the next 2 lines!! -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/ide-media.sh %k", RESULT=="floppy", SYMLINK="floppy%e", NAME{ignore_remove, all_partitions}="%k" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/ide-media.sh %k", RESULT=="floppy", SYMLINK+="floppy%e", NAME{ignore_remove, all_partitions}="%k" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK="cdrom%e" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", RESULT=="cdrom", SYMLINK+="cdrom%e" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD", SYMLINK="dvd%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD", SYMLINK="dvd%e" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" +KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD", SYMLINK+="dvd%e" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k CD-R", SYMLINK="cdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k CD-R", SYMLINK="cdwriter%e" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" +KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k CD-R", SYMLINK+="cdwriter%e" -KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/etc/udev/scripts/check-cdrom.sh %k DVD-R", SYMLINK="dvdwriter%e" -KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD-R", SYMLINK="dvdwriter%e" +KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", PROGRAM="/etc/udev/scripts/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" +KERNEL=="sr[0-9]*", BUS=="scsi", PROGRAM=="/etc/udev/scripts/check-cdrom.sh %k DVD-R", SYMLINK+="dvdwriter%e" # rename sr* to scd* KERNEL=="sr[0-9]*", BUS=="scsi", NAME="scd%n" KERNEL=="hd[a-z]*", BUS=="ide", SYSFS{removable}=="1", NAME{ignore_remove}="%k" KERNEL=="dvb*", PROGRAM=="/etc/udev/scripts/dvb.sh %k", NAME="%c" + + +# Perhaps this should just be for all subsystems? + +ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \ + RUN+="/sbin/modprobe $modalias" +ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \ + RUN+="/sbin/modprobe $modalias" +ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ + RUN+="/sbin/modprobe $modalias" +ACTION=="add", SUBSYSTEM=="pcmcia", MODALIAS=="*", \ + RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'" + +ACTION=="add", SUBSYSTEM=="ieee1394", MODALIAS=="*", \ + RUN+="/sbin/modprobe $modalias" + +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", \ + RUN+="/sbin/modprobe sd_mod" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", \ + RUN+="/sbin/modprobe sd_mod" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", \ + RUN+="/sbin/modprobe sr_mod" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", \ + SYSFS{model}!="ADR*", RUN+="/sbin/modprobe osst" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", \ + SYSFS{model}=="ADR*", RUN+="/sbin/modprobe st" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="Onstream", \ + RUN+="/sbin/modprobe st" +ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", \ + RUN+="/sbin/modprobe sg" + +ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}="*", \ + RUN+="/sbin/firmware_helper" |