chiark / gitweb /
update Debian rules
[elogind.git] / etc / udev / debian / hotplug.rules
index 84f8c32156f9b9d0e100a864c6a523e15cccac7c..426424de5ad68b794cbe35cd1a8bb7806b6684f6 100644 (file)
@@ -1,18 +1,19 @@
 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"
-
-# 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"
+ENV{PHYSDEVDRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
 
 # 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+="ide.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"
+
+# rules for subsystems which lack proper hotplug support
+#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", \
@@ -21,26 +22,22 @@ 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}=="[345]",        RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", SYSFS{type}=="[45]", 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}=="...", \
-#      RUN+="/lib/hotplug/scsi-re-add"
+#      RUN+="scsi-re-add"
 
-SUBSYSTEM=="firmware",                 RUN+="/lib/hotplug/firmware.agent"
+SUBSYSTEM=="firmware",         RUN+="firmware.agent"
 
 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+="logger.agent"