1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-31 07:51:08 +03:00

update Debian rules

This commit is contained in:
Marco d'Itri 2007-03-21 20:05:08 +01:00 committed by Kay Sievers
parent 1ce3e4fef0
commit 89d3ee2b3a
5 changed files with 59 additions and 24 deletions

View File

@ -20,14 +20,15 @@ SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
# IDE devices
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# SCSI devices
SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# RAID controllers
KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", \
KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k"
# other block devices
@ -47,7 +48,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
SYMLINK+="pilot"
# usbfs-like devices
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
NAME="%c"
# serial devices
@ -69,7 +70,7 @@ KERNEL=="video[0-9]*", NAME="v4l/%k"
KERNEL=="radio[0-9]*", NAME="v4l/%k"
KERNEL=="vbi[0-9]*", NAME="v4l/%k"
KERNEL=="vtx[0-9]*", NAME="v4l/%k"
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"
KERNEL=="fb[0-9]*", NAME="fb/%n"
KERNEL=="card[0-9]*", NAME="dri/%k"
@ -147,6 +148,5 @@ SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
# device mapper creates its own device nodes, so ignore these
KERNEL=="dm-[0-9]*", NAME=""
KERNEL=="device-mapper", NAME="mapper/control"

View File

@ -3,17 +3,20 @@ ACTION!="add", GOTO="hotplug_not_add_event"
# check if the device has already been claimed by a driver
ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
# this driver is broken and should not be loaded automatically (see #398962)
SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded"
# load the drivers
ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}"
SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent"
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'"
SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
# rules for subsystems which lack proper hotplug support
SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
#SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc-block"
SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block"
SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \
@ -23,6 +26,7 @@ SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
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}=="8", RUN+="/sbin/modprobe ch"
SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg"
SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi"

View File

@ -11,7 +11,11 @@ SUBSYSTEM=="net", ENV{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
# default permissions for block devices
SUBSYSTEM=="block", GROUP="disk"
SUBSYSTEM=="block", ATTR{removable}=="1", GROUP="floppy"
# the aacraid driver is broken and reports that disks removable (see #404927)
SUBSYSTEM=="block", ATTRS{removable}=="1", \
DRIVERS!="aacraid", GROUP="floppy"
# all block devices on these buses are "removable"
SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
# IDE devices
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
@ -25,8 +29,10 @@ KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
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}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
# USB devices
KERNEL=="legousbtower*", MODE="0666"
@ -74,10 +80,12 @@ KERNEL=="sgi_fetchop", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", GROUP="video"
KERNEL=="nvram", GROUP="nvram"
KERNEL=="rtc", GROUP="audio"
KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
KERNEL=="fuse", GROUP="fuse"
KERNEL=="kqemu", MODE="0666"
KERNEL=="kvm", GROUP="kvm"
KERNEL=="tun", MODE="0666"
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
@ -105,6 +113,7 @@ KERNEL=="video1394*", GROUP="video"
KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
MODE="0664", GROUP="video"
KERNEL=="js[0-9]*", MODE="0664"
KERNEL=="lirc[0-9]*", GROUP="video"
# AOE character devices
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"

View File

@ -5,12 +5,12 @@ SUBSYSTEM!="block", GOTO="no_volume_id"
ACTION!="add", GOTO="no_volume_id"
# and we can safely ignore these kinds of devices
KERNEL=="ram*|loop*|fd*|nbd*|dm-*", GOTO="no_volume_id"
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id"
# skip removable ide devices, because open(2) on them causes an events loop
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \
GOTO="no_volume_id"
KERNEL=="hd*[0-9]", ATTR{../removable}=="1", \
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \
GOTO="no_volume_id"
# skip xen virtual hard disks
@ -20,13 +20,17 @@ DRIVERS=="vbd", GOTO="no_hardware_id"
KERNEL=="hd*[!0-9]", \
IMPORT{program}="ata_id --export $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", \
KERNEL=="sd*[!0-9]|sr*|st*|nst*", ATTRS{ieee1394_id}=="?*", \
ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
KERNEL=="dasd*[!0-9]", \
@ -47,16 +51,35 @@ KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL_SHORT}=="?*", \
ENV{ID_VENDOR}=="ATA", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \
ENV{ID_VENDOR}=="ATA", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n"
KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \
ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \
SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \
ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \
SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", \
SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", \
SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
KERNEL=="sd*[!0-9]|dasd[!0-9]*|sr*", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="st*", ENV{ID_SERIAL}=="?*", \
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", \
SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", \
SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \
SYMLINK+="disk/by-path/$env{ID_PATH}"

View File

@ -33,7 +33,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
SYMLINK+="pilot"
# usbfs-like devices
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
NAME="%c"
# serial devices
@ -41,7 +41,7 @@ KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi[0-9]*", NAME="capi/%n"
# video devices
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"
KERNEL=="card[0-9]*", NAME="dri/%k"
@ -97,6 +97,5 @@ SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
# device mapper creates its own device nodes, so ignore these
KERNEL=="dm-[0-9]*", NAME=""
KERNEL=="device-mapper", NAME="mapper/control"