mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-24 08:00:08 +07:00
update Debian rules
This commit is contained in:
parent
2f64aa4056
commit
49e7f5a05f
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user