chiark / gitweb /
update Debian rules
authorMarco d'Itri <md@Linux.IT>
Fri, 25 Nov 2005 18:35:26 +0000 (19:35 +0100)
committerKay Sievers <kay.sievers@suse.de>
Fri, 25 Nov 2005 18:35:26 +0000 (19:35 +0100)
etc/udev/debian/devfs.rules
etc/udev/debian/hotplug.rules
etc/udev/debian/hotplugd.rules
etc/udev/debian/permissions.rules
etc/udev/debian/udev.rules

index b1696c7..c4a44e3 100644 (file)
 
 # workaround for devices which do not report media changes
 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
 
 # workaround for devices which do not report media changes
 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
-  PROGRAM="/sbin/ata_id --export $tempnode", ENV{ID_MODEL}=="IOMEGA_ZIP*", \
-                                       NAME="%k", OPTIONS+="all_partitions"
+       ENV{ID_MODEL}=="IOMEGA_ZIP*",   NAME="%k", OPTIONS+="all_partitions"
 
 # IDE devices
 
 # IDE devices
-BUS=="ide", KERNEL=="hd[a-z]*", \
-  PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", \
+BUS=="ide", KERNEL=="hd[a-z]*", PROGRAM="/lib/udev/ide-devfs.sh %k %b %n", \
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # SCSI devices
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # SCSI devices
-BUS=="scsi", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
+BUS=="scsi", PROGRAM="/lib/udev/scsi-devfs.sh %k %b %n", \
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # RAID controllers
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # RAID controllers
-KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", \
+KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="/lib/udev/raid-devfs.sh %k", \
                                        NAME="%c{1}", SYMLINK+="%k"
 
 # other block devices
                                        NAME="%c{1}", SYMLINK+="%k"
 
 # other block devices
@@ -47,8 +45,8 @@ BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
                                        SYMLINK+="pilot"
 
 # usbfs-like devices
                                        SYMLINK+="pilot"
 
 # usbfs-like devices
-SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k K=$${K#usbdev} B=$${K%%%%.*} D=$${K#*.}; echo bus/usb/$$B/$$D'", \
-                               SYMLINK+="%c"
+SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; B=$${K%%%%.*}; D=$${K#*.}; echo bus/usb/$$B/$$D'", \
+                               NAME="%c"
 
 # serial devices
 KERNEL=="ttyS[0-9]*",          NAME="tts/%n"
 
 # serial devices
 KERNEL=="ttyS[0-9]*",          NAME="tts/%n"
@@ -69,7 +67,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=="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 'KNAME=%k KNAME=$${KNAME#dvb} A=$${KNAME%%%%.*} D=$${KNAME#*.}; echo dvb/adapter$$A/$$D'", \
+KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'KNAME=%k; KNAME=$${KNAME#dvb}; A=$${KNAME%%%%.*}; D=$${KNAME#*.}; echo dvb/adapter$$A/$$D'", \
                                NAME="%c"
 KERNEL=="fb[0-9]*",            NAME="fb/%n"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
                                NAME="%c"
 KERNEL=="fb[0-9]*",            NAME="fb/%n"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
@@ -101,7 +99,7 @@ KERNEL=="microcode",         NAME="cpu/microcode"
 KERNEL=="umad*",               NAME="infiniband/%k"
 KERNEL=="issm*",               NAME="infiniband/%k"
 KERNEL=="uverbs*",             NAME="infiniband/%k"
 KERNEL=="umad*",               NAME="infiniband/%k"
 KERNEL=="issm*",               NAME="infiniband/%k"
 KERNEL=="uverbs*",             NAME="infiniband/%k"
-KERNEL=="ucm",                 NAME="infiniband/%k"
+KERNEL=="ucm*",                        NAME="infiniband/%k"
 
 # sound devices
 KERNEL=="controlC[0-9]*",      NAME="snd/%k"
 
 # sound devices
 KERNEL=="controlC[0-9]*",      NAME="snd/%k"
@@ -145,6 +143,6 @@ SUBSYSTEM=="aoe", KERNEL=="err",    NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
 SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*",           OPTIONS+="ignore_device"
+KERNEL=="dm-[0-9]*",           NAME=""
 KERNEL=="device-mapper",       NAME="mapper/control"
 
 KERNEL=="device-mapper",       NAME="mapper/control"
 
index 84f8c32..f4c99ec 100644 (file)
@@ -1,18 +1,23 @@
 ACTION!="add", GOTO="hotplug_not_add_event"
 
 # check if the device has already been claimed by a driver
 ACTION!="add", GOTO="hotplug_not_add_event"
 
 # check if the device has already been claimed by a driver
-PROGRAM="/bin/sh -c 'test -e /sys$devpath/driver'", \
-                                       GOTO="hotplug_driver_loaded"
+ENV{PHYSDEVDRIVER}=="?*", GOTO="hotplug_driver_loaded"
 
 # workarounds for kernels which lack $MODALIAS support
 
 # workarounds for kernels which lack $MODALIAS support
-SUBSYSTEM=="input", BUS=="serio", ENV{MODALIAS}!="?*", \
-       IMPORT{program}="/lib/hotplug/modalias_serio"
-SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", \
-       IMPORT{program}="/lib/hotplug/modalias_ieee1394"
+SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", \
+       IMPORT{program}="/lib/udev/modalias_ieee1394"
+SUBSYSTEM=="serio",    ENV{MODALIAS}!="?*", \
+       IMPORT{program}="/lib/udev/modalias_serio"
 
 # load the drivers
 
 # load the drivers
-ENV{MODALIAS}=="?*",                   RUN+="/sbin/modprobe $modalias"
-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
+ENV{MODALIAS}=="?*",   RUN+="/sbin/modprobe $env{MODALIAS}"
+SUBSYSTEM=="ide",      ENV{MODALIAS}!="?*",    RUN+="/lib/udev/ide.agent"
+#SUBSYSTEM=="input",   ENV{MODALIAS}!="?*",    RUN+="/lib/udev/input.agent"
+SUBSYSTEM=="vio",      ENV{MODALIAS}!="?*",    RUN+="/lib/udev/vio.agent"
+
+SUBSYSTEM=="pnp",      ENV{MODALIAS}!="?*",    RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
+
+SUBSYSTEM=="pcmcia_socket",                    RUN+="/sbin/modprobe pcmcia"
 
 SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
 SUBSYSTEM=="scsi_device", SYSFS{type}=="1",    RUN+="/sbin/modprobe osst", \
 
 SUBSYSTEM=="scsi_device", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
 SUBSYSTEM=="scsi_device", SYSFS{type}=="1",    RUN+="/sbin/modprobe osst", \
@@ -24,23 +29,19 @@ SUBSYSTEM=="scsi_device", SYSFS{type}=="1", RUN+="/sbin/modprobe st", \
 SUBSYSTEM=="scsi_device", SYSFS{type}=="[345]",        RUN+="/sbin/modprobe sr_mod"
 SUBSYSTEM=="scsi_device", SYSFS{type}=="[235689]", RUN+="/sbin/modprobe sg"
 
 SUBSYSTEM=="scsi_device", SYSFS{type}=="[345]",        RUN+="/sbin/modprobe sr_mod"
 SUBSYSTEM=="scsi_device", SYSFS{type}=="[235689]", RUN+="/sbin/modprobe sg"
 
-SUBSYSTEM=="input_device", ENV{ABS}=="?*",     RUN+="/sbin/modprobe joydev"
-
-SUBSYSTEM=="ide",                              RUN+="/lib/hotplug/ide.agent"
-
 # 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}=="...", \
 # 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}=="...", \
-#      RUN+="/lib/hotplug/scsi-re-add"
+#      RUN+="/lib/udev/scsi-re-add"
 
 
-SUBSYSTEM=="firmware",                 RUN+="/lib/hotplug/firmware.agent"
+SUBSYSTEM=="firmware",         RUN+="/lib/udev/firmware.agent"
 
 LABEL="hotplug_not_add_event"
 
 
 LABEL="hotplug_not_add_event"
 
-SUBSYSTEM=="net",                      RUN+="/lib/hotplug/net.agent"
+SUBSYSTEM=="net",              RUN+="/bin/sh -c '/lib/udev/net.agent &'"
 
 
-# for debugging
-#RUN+="/lib/hotplug/logger.agent"
+# Log every event to /dev/hotplug.log (for debugging).
+#RUN+="/lib/udev/logger.agent"
 
 
index 7b85e17..d79ce85 100644 (file)
@@ -4,6 +4,6 @@ SUBSYSTEM=="module",    OPTIONS="last_rule"
 
 # compatibility support for the obsolete hotplug.d and dev.d directories
 # do not run the hotplug.d scripts when started from udevstart
 
 # compatibility support for the obsolete hotplug.d and dev.d directories
 # do not run the hotplug.d scripts when started from udevstart
-ENV{UDEVD_EVENT}=="1", RUN+="/sbin/udev_run_hotplugd"
-RUN+="/sbin/udev_run_devd"
+ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd"
+RUN+="/lib/udev/udev_run_devd"
 
 
index 02bfefd..bc97566 100644 (file)
@@ -1,7 +1,10 @@
+# workaround needed to make udevd wait for the "bus" link
+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", \
+       WAIT_FOR_SYSFS="bus"
+
 # default permissions for block devices
 SUBSYSTEM=="block",                            GROUP="disk"
 SUBSYSTEM=="block", SYSFS{removable}=="1",     GROUP="floppy"
 # default permissions for block devices
 SUBSYSTEM=="block",                            GROUP="disk"
 SUBSYSTEM=="block", SYSFS{removable}=="1",     GROUP="floppy"
-SUBSYSTEM=="block", SYSFS{../removable}=="1",  GROUP="floppy"
 
 # IDE devices
 BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", ACTION=="add", \
 
 # IDE devices
 BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", ACTION=="add", \
@@ -19,6 +22,9 @@ BUS=="scsi", SYSFS{type}=="6",        GROUP="scanner"
 BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
 BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
 
 BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
 BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
 
+# usbfs-like devices
+SUBSYSTEM=="usb_device", MODE="0664"
+
 # serial devices
 SUBSYSTEM=="tty",      GROUP="dialout"
 SUBSYSTEM=="capi",     GROUP="dialout"
 # serial devices
 SUBSYSTEM=="tty",      GROUP="dialout"
 SUBSYSTEM=="capi",     GROUP="dialout"
@@ -41,7 +47,7 @@ SUBSYSTEM=="nvidia",  GROUP="video"
 
 # misc devices
 KERNEL=="random",      MODE="0666"
 
 # misc devices
 KERNEL=="random",      MODE="0666"
-KERNEL=="urandom",     MODE="0444"
+KERNEL=="urandom",     MODE="0666"
 KERNEL=="mem",         MODE="0640", GROUP="kmem"
 KERNEL=="kmem",                MODE="0640", GROUP="kmem"
 KERNEL=="port",                MODE="0640", GROUP="kmem"
 KERNEL=="mem",         MODE="0640", GROUP="kmem"
 KERNEL=="kmem",                MODE="0640", GROUP="kmem"
 KERNEL=="port",                MODE="0640", GROUP="kmem"
@@ -53,13 +59,17 @@ KERNEL=="sgi_fetchop",      MODE="0666"
 KERNEL=="sonypi",      MODE="0666"
 KERNEL=="agpgart",     GROUP="video"
 KERNEL=="nvram",       GROUP="nvram"
 KERNEL=="sonypi",      MODE="0666"
 KERNEL=="agpgart",     GROUP="video"
 KERNEL=="nvram",       GROUP="nvram"
-KERNEL=="rtc",         MODE="0660", GROUP="audio"
+KERNEL=="rtc",         GROUP="audio"
 KERNEL=="tpm*",                MODE="0600", OWNER="tss", GROUP="tss"
 KERNEL=="tpm*",                MODE="0600", OWNER="tss", GROUP="tss"
+KERNEL=="fuse",                GROUP="fuse"
 
 KERNEL=="cdemu[0-9]*", GROUP="cdrom"
 KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
 KERNEL=="pktcdvd",     MODE="0644"
 
 
 KERNEL=="cdemu[0-9]*", GROUP="cdrom"
 KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
 KERNEL=="pktcdvd",     MODE="0644"
 
+KERNEL=="uverbs*",     GROUP="rdma"
+KERNEL=="ucm*",                GROUP="rdma"
+
 # printers and parallel devices
 SUBSYSTEM=="printer",  GROUP="lp"
 SUBSYSTEM=="ppdev",    GROUP="lp"
 # printers and parallel devices
 SUBSYSTEM=="printer",  GROUP="lp"
 SUBSYSTEM=="ppdev",    GROUP="lp"
@@ -75,7 +85,7 @@ KERNEL=="dv1394*",    GROUP="video"
 KERNEL=="video1394*",  GROUP="video"
 
 # input devices
 KERNEL=="video1394*",  GROUP="video"
 
 # input devices
-KERNEL=="event[0-9]*", PROGRAM="/etc/udev/scripts/inputdev.sh %k", \
+KERNEL=="event[0-9]*", PROGRAM="/lib/udev/inputdev.sh %k", \
                        RESULT=="inputdev", MODE="0664", GROUP="video"
 KERNEL=="js[0-9]*",    MODE="0664"
 
                        RESULT=="inputdev", MODE="0664", GROUP="video"
 KERNEL=="js[0-9]*",    MODE="0664"
 
index 27eb43e..b5dfd00 100644 (file)
@@ -15,8 +15,7 @@
 
 # workaround for devices which do not report media changes
 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
 
 # workaround for devices which do not report media changes
 BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
-  PROGRAM="/sbin/ata_id --export $tempnode", ENV{ID_MODEL}=="IOMEGA_ZIP*", \
-                                       NAME="%k", OPTIONS+="all_partitions"
+       ENV{ID_MODEL}=="IOMEGA_ZIP*",   NAME="%k", OPTIONS+="all_partitions"
 
 # SCSI devices
 BUS=="scsi", KERNEL=="sr[0-9]*",       NAME="scd%n", SYMLINK+="sr%n"
 
 # SCSI devices
 BUS=="scsi", KERNEL=="sr[0-9]*",       NAME="scd%n", SYMLINK+="sr%n"
@@ -32,15 +31,15 @@ BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
                                        SYMLINK+="pilot"
 
 # usbfs-like devices
                                        SYMLINK+="pilot"
 
 # usbfs-like devices
-SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k K=$${K#usbdev} B=$${K%%%%.*} D=$${K#*.}; echo bus/usb/$$B/$$D'", \
-                               SYMLINK+="%c"
+SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; B=$${K%%%%.*}; D=$${K#*.}; echo bus/usb/$$B/$$D'", \
+                               NAME="%c"
 
 # serial devices
 KERNEL=="capi",                        NAME="capi20", SYMLINK+="isdn/capi20"
 KERNEL=="capi[0-9]*",          NAME="capi/%n"
 
 # video devices
 
 # serial devices
 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} A=$${K%%%%.*} D=$${K#*.}; echo dvb/adapter$$A/$$D'", \
+KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; A=$${K%%%%.*}; D=$${K#*.}; echo dvb/adapter$$A/$$D'", \
                                NAME="%c"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
 
                                NAME="%c"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
 
@@ -59,7 +58,7 @@ KERNEL=="microcode",          NAME="cpu/microcode"
 KERNEL=="umad*",               NAME="infiniband/%k"
 KERNEL=="issm*",               NAME="infiniband/%k"
 KERNEL=="uverbs*",             NAME="infiniband/%k"
 KERNEL=="umad*",               NAME="infiniband/%k"
 KERNEL=="issm*",               NAME="infiniband/%k"
 KERNEL=="uverbs*",             NAME="infiniband/%k"
-KERNEL=="ucm",                 NAME="infiniband/%k"
+KERNEL=="ucm*",                        NAME="infiniband/%k"
 
 # ALSA devices
 KERNEL=="controlC[0-9]*",      NAME="snd/%k"
 
 # ALSA devices
 KERNEL=="controlC[0-9]*",      NAME="snd/%k"
@@ -94,6 +93,6 @@ SUBSYSTEM=="aoe", KERNEL=="err",      NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
 SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*",           OPTIONS+="ignore_device"
+KERNEL=="dm-[0-9]*",           NAME=""
 KERNEL=="device-mapper",       NAME="mapper/control"
 
 KERNEL=="device-mapper",       NAME="mapper/control"