chiark / gitweb /
update Debian rules
authorKay Sievers <kay.sievers@suse.de>
Fri, 23 Sep 2005 07:51:49 +0000 (09:51 +0200)
committerKay Sievers <kay.sievers@suse.de>
Fri, 23 Sep 2005 07:51:49 +0000 (09:51 +0200)
etc/udev/debian/compat-full.rules [deleted file]
etc/udev/debian/hotplug.rules [new file with mode: 0644]
etc/udev/debian/hotplugd.rules
etc/udev/debian/persistent.rules
etc/udev/debian/run.rules

diff --git a/etc/udev/debian/compat-full.rules b/etc/udev/debian/compat-full.rules
deleted file mode 100644 (file)
index 50e24bc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# compatibility links for a devfs-style /dev
-
-KERNEL=="md[0-9]*",    SYMLINK+="%k"
-KERNEL=="loop[0-9]*",  SYMLINK+="%k"
-
-KERNEL=="tty[0-9]*",   SYMLINK+="%k"
-KERNEL=="ttyS[0-9]*",  SYMLINK+="%k"
-KERNEL=="ttyUSB[0-9]*",        SYMLINK+="%k"
-
-KERNEL=="vcs",         SYMLINK+="%k"
-KERNEL=="vcs[0-9]*",   SYMLINK+="%k"
-KERNEL=="vcsa",                SYMLINK+="%k"
-KERNEL=="vcsa[0-9]*",  SYMLINK+="%k"
-
-KERNEL=="video*",      SYMLINK+="%k"
-KERNEL=="radio*",      SYMLINK+="%k"
-KERNEL=="vbi*",                SYMLINK+="%k"
-KERNEL=="vtx*",                SYMLINK+="%k"
-
-KERNEL=="apm_bios",    SYMLINK+="%k"
-KERNEL=="agpgart",     SYMLINK+="%k"
-KERNEL=="psaux",       SYMLINK+="%k"
-KERNEL=="nvram",       SYMLINK+="%k"
-KERNEL=="rtc",         SYMLINK+="%k"
-KERNEL=="ram[0-9]*",   SYMLINK+="%k"
-
-KERNEL=="i2c-[0-9]*",  SYMLINK+="%k"
-KERNEL=="lp[0-9]*",    SYMLINK+="%k"
-
-KERNEL=="audio*"       SYMLINK+="%k"
-KERNEL=="dsp*"         SYMLINK+="%k"
-KERNEL=="mixer*"       SYMLINK+="%k"
-
-KERNEL=="fb[0-9]*",    SYMLINK+="%k"
-KERNEL=="fd[0-9]*",    SYMLINK+="%k"
-KERNEL=="js[0-9]*",    SYMLINK+="%k"
-
diff --git a/etc/udev/debian/hotplug.rules b/etc/udev/debian/hotplug.rules
new file mode 100644 (file)
index 0000000..84f8c32
--- /dev/null
@@ -0,0 +1,46 @@
+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"
+
+# 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'"
+
+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}=="[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}=="...", \
+#      RUN+="/lib/hotplug/scsi-re-add"
+
+SUBSYSTEM=="firmware",                 RUN+="/lib/hotplug/firmware.agent"
+
+LABEL="hotplug_not_add_event"
+
+SUBSYSTEM=="net",                      RUN+="/lib/hotplug/net.agent"
+
+# for debugging
+#RUN+="/lib/hotplug/logger.agent"
+
index e311d22..7b85e17 100644 (file)
@@ -7,9 +7,3 @@ SUBSYSTEM=="module",    OPTIONS="last_rule"
 ENV{UDEVD_EVENT}=="1", RUN+="/sbin/udev_run_hotplugd"
 RUN+="/sbin/udev_run_devd"
 
-# run a command on remove events
-ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
-
-# debugging monitor
-RUN+="socket:/org/kernel/udev/monitor"
-
index a6467fa..7bd44da 100644 (file)
@@ -8,14 +8,14 @@ ACTION!="add",                                GOTO="no_volume_id"
 KERNEL=="ram*|loop*|fd*|nbd*",         GOTO="no_volume_id"
 
 # skip removable ide devices, because open(2) on them causes an events loop
-BUS=="ide", SYSFS{removable}=="1",     GOTO="no_volume_id"
-BUS=="ide", SYSFS{../removable}=="1",  GOTO="no_volume_id"
+BUS=="ide", SYSFS{removable}=="1", DRIVER!="ide-cdrom",        GOTO="no_volume_id"
+BUS=="ide", SYSFS{../removable}=="1",                  GOTO="no_volume_id"
 
 # disk id
 KERNEL=="hd*[!0-9]", \
        IMPORT{program}="/sbin/ata_id --export $tempnode"
 
-KERNEL=="sd*[!0-9]|sr*",               SYSFS{ieee1394_id}=="*", \
+KERNEL=="sd*[!0-9]|sr*",               SYSFS{ieee1394_id}=="?*", \
        IMPORT{program}="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394'"
 KERNEL=="sd*[!0-9]|sr*",               ENV{ID_SERIAL}=="", \
        IMPORT{program}="/sbin/usb_id -x"
@@ -39,7 +39,7 @@ KERNEL=="sd*[0-9]|dasd*[0-9]",                ENV{ID_SERIAL}=="?*", \
 
 # path
 KERNEL=="*[!0-9]|sr*",                 ENV{ID_TYPE}=="?*", \
-       IMPORT{program}="/sbin/path_id %p",
+       IMPORT{program}="/sbin/path_id %p"
 
 KERNEL=="*[0-9]",                      IMPORT{parent}="ID_*"
 KERNEL=="*[!0-9]|sr*",                 ENV{ID_PATH}=="?*", \
index 23fa43c..75d7137 100644 (file)
@@ -1,3 +1,9 @@
+# debugging monitor
+RUN+="socket:/org/kernel/udev/monitor"
+
+# run a command on remove events
+ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
+
 # ignore the events generated by virtual consoles
 KERNEL=="ptmx",                OPTIONS+="last_rule"
 KERNEL=="console",     OPTIONS+="last_rule"