summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/udev/debian/compat-full.rules37
-rw-r--r--etc/udev/debian/hotplug.rules46
-rw-r--r--etc/udev/debian/hotplugd.rules6
-rw-r--r--etc/udev/debian/persistent.rules8
-rw-r--r--etc/udev/debian/run.rules6
5 files changed, 56 insertions, 47 deletions
diff --git a/etc/udev/debian/compat-full.rules b/etc/udev/debian/compat-full.rules
deleted file mode 100644
index 50e24bc64a..0000000000
--- a/etc/udev/debian/compat-full.rules
+++ /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
index 0000000000..84f8c32156
--- /dev/null
+++ b/etc/udev/debian/hotplug.rules
@@ -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"
+
diff --git a/etc/udev/debian/hotplugd.rules b/etc/udev/debian/hotplugd.rules
index e311d22678..7b85e179e8 100644
--- a/etc/udev/debian/hotplugd.rules
+++ b/etc/udev/debian/hotplugd.rules
@@ -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"
-
diff --git a/etc/udev/debian/persistent.rules b/etc/udev/debian/persistent.rules
index a6467fa319..7bd44da36c 100644
--- a/etc/udev/debian/persistent.rules
+++ b/etc/udev/debian/persistent.rules
@@ -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}=="?*", \
diff --git a/etc/udev/debian/run.rules b/etc/udev/debian/run.rules
index 23fa43c051..75d71375bb 100644
--- a/etc/udev/debian/run.rules
+++ b/etc/udev/debian/run.rules
@@ -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"