summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/udev/debian/devfs.rules28
-rw-r--r--etc/udev/debian/hotplug.rules24
-rw-r--r--etc/udev/debian/permissions.rules28
-rw-r--r--etc/udev/debian/persistent-input.rules26
-rw-r--r--etc/udev/debian/persistent.rules17
-rw-r--r--etc/udev/debian/udev.rules24
6 files changed, 83 insertions, 64 deletions
diff --git a/etc/udev/debian/devfs.rules b/etc/udev/debian/devfs.rules
index 14a67bbdc2..107b197d91 100644
--- a/etc/udev/debian/devfs.rules
+++ b/etc/udev/debian/devfs.rules
@@ -3,7 +3,6 @@
#
# %n the "kernel number" of the device.
# For example, 'sda3' has a "kernel number" of '3'
-# %e the smallest number for that name which does not matches an existing node
# %k the kernel name for the device
# %M the kernel major number for the device
# %m the kernel minor number for the device
@@ -14,15 +13,17 @@
#
# workaround for devices which do not report media changes
-BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{removable}=="1", \
ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
+ OPTIONS+="all_partitions"
# IDE devices
-BUS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# SCSI devices
-BUS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
+SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# RAID controllers
@@ -35,15 +36,15 @@ KERNEL=="loop[0-9]*", NAME="loop/%n"
KERNEL=="ram[0-9]*", NAME="rd/%n"
# USB devices
-BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
-BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
-BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="ttyUSB*", \
- SYSFS{product}=="Palm Handheld*|Handspring Visor", \
- SYMLINK+="pilot"
+SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
+ ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
+ SYMLINK+="pilot"
# usbfs-like devices
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
@@ -81,6 +82,7 @@ KERNEL=="nvram", NAME="misc/%k"
KERNEL=="psaux", NAME="misc/%k"
KERNEL=="rtc", NAME="misc/%k"
KERNEL=="tun", NAME="net/%k"
+KERNEL=="evtchn", NAME="xen/%k"
# printers and parallel devices
KERNEL=="lp[0-9]*", NAME="printers/%n"
diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules
index 426424de5a..eae68864c9 100644
--- a/etc/udev/debian/hotplug.rules
+++ b/etc/udev/debian/hotplug.rules
@@ -12,24 +12,26 @@ SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin
SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
# rules for subsystems which lack proper hotplug support
-#SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
+SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
#SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc-block"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe osst", \
- SYSFS{vendor}=="Onstream", SYSFS{model}!="ADR*"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe st", \
- SYSFS{vendor}=="Onstream", SYSFS{model}=="ADR*"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe st", \
- SYSFS{vendor}!="Onstream"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
-SUBSYSTEM=="scsi_device", SYSFS{type}=="[235689]", RUN+="/sbin/modprobe sg"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \
+ ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
+ ATTRS{vendor}=="Onstream", ATTRS{model}=="ADR*"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
+ ATTRS{vendor}!="Onstream"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg"
+
+SUBSYSTEM=="ide", ATTRS{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
# From here on follows the hotplug agents which do not load modules
LABEL="hotplug_driver_loaded"
# FIXME: does a sane default exist?
-#SUBSYSTEM=="scsi_device", SYSFS{idVendor}=="...", \
+#SUBSYSTEM=="scsi_device", ATTRS{idVendor}=="...", \
# RUN+="scsi-re-add"
SUBSYSTEM=="firmware", RUN+="firmware.agent"
diff --git a/etc/udev/debian/permissions.rules b/etc/udev/debian/permissions.rules
index 8da35c3090..8b369596a3 100644
--- a/etc/udev/debian/permissions.rules
+++ b/etc/udev/debian/permissions.rules
@@ -1,6 +1,7 @@
ACTION!="add", GOTO="permissions_end"
# workarounds needed to synchronize with sysfs
+# only needed for kernels < v2.6.18-rc1
DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
# only needed for kernels < 2.6.16
@@ -10,31 +11,32 @@ SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
# default permissions for block devices
SUBSYSTEM=="block", GROUP="disk"
-SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy"
+SUBSYSTEM=="block", ATTRS{removable}=="1", GROUP="floppy"
# IDE devices
-BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \
+KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
IMPORT{program}="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", GROUP="cdrom"
-BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape"
-BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape"
+KERNEL=="ht[0-9]*", GROUP="tape"
+KERNEL=="nht[0-9]*", GROUP="tape"
# SCSI devices
-BUS=="scsi", SYSFS{type}=="1", GROUP="tape"
-BUS=="scsi", SYSFS{type}=="3", SYSFS{vendor}=="HP", GROUP="scanner"
-BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom"
-BUS=="scsi", SYSFS{type}=="6", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
+SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
# USB devices
-BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
-BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
+KERNEL=="legousbtower*", MODE="0666"
+KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
# usbfs-like devices
SUBSYSTEM=="usb_device", MODE="0664"
# iRiver music players
SUBSYSTEM=="usb_device", GROUP="plugdev", \
- SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]"
+ ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
# serial devices
SUBSYSTEM=="tty", GROUP="dialout"
@@ -74,6 +76,7 @@ KERNEL=="nvram", GROUP="nvram"
KERNEL=="rtc", GROUP="audio"
KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
KERNEL=="fuse", GROUP="fuse"
+KERNEL=="kqemu", MODE="0666"
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
@@ -85,6 +88,7 @@ KERNEL=="ucm*", GROUP="rdma"
# printers and parallel devices
SUBSYSTEM=="printer", GROUP="lp"
SUBSYSTEM=="ppdev", GROUP="lp"
+KERNEL=="irlpt*", GROUP="lp"
KERNEL=="pt[0-9]*", GROUP="tape"
KERNEL=="pht[0-9]*", GROUP="tape"
@@ -97,7 +101,7 @@ KERNEL=="dv1394*", GROUP="video"
KERNEL=="video1394*", GROUP="video"
# input devices
-KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \
+KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
MODE="0664", GROUP="video"
KERNEL=="js[0-9]*", MODE="0664"
diff --git a/etc/udev/debian/persistent-input.rules b/etc/udev/debian/persistent-input.rules
index 293971266e..a9005e075b 100644
--- a/etc/udev/debian/persistent-input.rules
+++ b/etc/udev/debian/persistent-input.rules
@@ -4,26 +4,30 @@ ACTION!="add", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"
# usb devices
-BUS=="usb", IMPORT{program}="usb_id -x"
-BUS=="usb", SYSFS{bInterfaceClass}=="03", SYSFS{bInterfaceProtocol}=="01", \
+SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
+SUBSYSTEMS=="usb", \
+ ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", \
ENV{ID_CLASS}="kbd"
-BUS=="usb", SYSFS{bInterfaceClass}=="03", SYSFS{bInterfaceProtocol}=="02", \
+SUBSYSTEMS=="usb", \
+ ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", \
ENV{ID_CLASS}="mouse"
# other devices
-DRIVER=="pcspkr", ENV{ID_CLASS}="spkr"
-DRIVER=="atkbd", ENV{ID_CLASS}="kbd"
-DRIVER=="psmouse", ENV{ID_CLASS}="mouse"
-SYSFS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
+DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
+DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
+DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
+ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
+# this means (ABS_X || ABS_WHEEL || ABS_THROTTLE) && !BTN_TOUCH
+ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", \
+ ATTRS{modalias}!="input:*-*k*14A,*r*", \
+ ENV{ID_CLASS}="joystick"
ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
# by-id links, generic and for the event devices
-KERNEL=="mouse*", \
- ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", \
+KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
-KERNEL=="event*", \
- ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", \
+KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", \
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
# by-path links
diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules
index 349817d797..ce8a6a0af2 100644
--- a/etc/udev/debian/persistent.rules
+++ b/etc/udev/debian/persistent.rules
@@ -8,16 +8,19 @@ ACTION!="add", GOTO="no_volume_id"
KERNEL=="ram*|loop*|fd*|nbd*|dm-*", GOTO="no_volume_id"
# skip removable ide devices, because open(2) on them causes an events loop
-KERNEL=="hd*[!0-9]", SYSFS{removable}=="1", DRIVER=="ide-cs|ide-floppy", \
+KERNEL=="hd*[!0-9]", ATTRS{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \
GOTO="no_volume_id"
-KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", \
+KERNEL=="hd*[0-9]", ATTRS{../removable}=="1", \
GOTO="no_volume_id"
+# skip xen virtual hard disks
+DRIVERS=="vbd", GOTO="no_hardware_id"
+
# look for different kinds of unique identificators
KERNEL=="hd*[!0-9]", \
IMPORT{program}="ata_id --export $tempnode"
-KERNEL=="sd*[!0-9]|sr*|st*", SYSFS{ieee1394_id}=="?*", \
+KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", \
ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$sysfs{ieee1394_id}"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
IMPORT{program}="usb_id -x"
@@ -35,6 +38,8 @@ KERNEL=="*[!0-9]", \
# find the physical path of the device
KERNEL=="*[!0-9]|sr*|st*", IMPORT{program}="path_id $devpath"
+LABEL="no_hardware_id"
+
# import the variables of partitions from the parent disks
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
@@ -62,11 +67,11 @@ KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \
SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
# UUID and volume label
-KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="no_volume_id"
+KERNEL=="*[!0-9]", ATTRS{removable}=="1", GOTO="no_volume_id"
IMPORT{program}="vol_id --export $tempnode"
-ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \
+ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \
SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
-ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \
+ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \
SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
# end of processing
diff --git a/etc/udev/debian/udev.rules b/etc/udev/debian/udev.rules
index 023337445c..6498a131da 100644
--- a/etc/udev/debian/udev.rules
+++ b/etc/udev/debian/udev.rules
@@ -3,7 +3,6 @@
#
# %n the "kernel number" of the device.
# For example, 'sda3' has a "kernel number" of '3'
-# %e the smallest number for that name which does not matches an existing node
# %k the kernel name for the device
# %M the kernel major number for the device
# %m the kernel minor number for the device
@@ -14,21 +13,23 @@
#
# workaround for devices which do not report media changes
-BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{removable}=="1", \
ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
+ OPTIONS+="all_partitions"
# SCSI devices
-BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
+SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
# USB devices
-BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
-BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
-BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
-BUS=="usb", KERNEL=="ttyUSB*", \
- SYSFS{product}=="Palm Handheld*|Handspring Visor", \
+SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
+SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
+ ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
SYMLINK+="pilot"
# usbfs-like devices
@@ -47,6 +48,7 @@ KERNEL=="card[0-9]*", NAME="dri/%k"
# misc devices
KERNEL=="hw_random", NAME="hwrng"
KERNEL=="tun", NAME="net/%k"
+KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"