1 |
# /etc/udev/rules/30-kernel-compat.rules: kernel compat rules for udev |
# /etc/udev/rules/30-kernel-compat.rules: kernel compat rules for udev |
2 |
# $Header: /root/magellan-cvs/src/udev/udev-kernel-compat.rules.magellan,v 1.2 2008-12-22 20:31:37 niro Exp $ |
# $Header: /root/magellan-cvs/src/udev/udev-kernel-compat.rules.magellan,v 1.3 2009-10-13 10:46:20 niro Exp $ |
3 |
# |
# |
4 |
# There are a number of modifiers that are allowed to be used in some |
# There are a number of modifiers that are allowed to be used in some |
5 |
# of the different fields. They provide the following subsitutions: |
# of the different fields. They provide the following subsitutions: |
21 |
ACTION!="add|change", GOTO="kernel_compat_end" |
ACTION!="add|change", GOTO="kernel_compat_end" |
22 |
|
|
23 |
# |
# |
|
# rules to workaround bad sysfs timing |
|
|
# |
|
|
|
|
|
ACTION!="add", GOTO="kernel_compat_wait_end" |
|
|
|
|
|
# workarounds needed to synchronize with sysfs |
|
|
# needed for kernels < v2.6.18-rc1 |
|
|
DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" |
|
|
SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", WAIT_FOR_SYSFS="ioerr_cnt" |
|
|
|
|
|
# needed for kernels <2.6.16 |
|
|
SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" |
|
|
|
|
|
# needed for kernels <2.6.17 |
|
|
SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" |
|
|
|
|
|
LABEL="kernel_compat_wait_end" |
|
|
|
|
|
# |
|
24 |
# naming device rules |
# naming device rules |
25 |
# |
# |
26 |
|
|
27 |
# old style usb sysfs devices |
# dvb device naming |
28 |
# needed for kernels <2.6.22 |
# needed for kernels <2.6.29-rc1 |
29 |
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" |
SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video" |
|
|
|
|
# /sys/class/block will export this |
|
|
# needed for kernels <2.6.25-rc1 |
|
|
SUBSYSTEM!="block", GOTO="block_devtype_end" |
|
|
ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk" |
|
|
ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition" |
|
|
LABEL="block_devtype_end" |
|
|
|
|
30 |
|
|
31 |
# |
# |
32 |
# module loading rules |
# module loading rules |
33 |
# |
# |
34 |
ACTION!="add", GOTO="kernel_compat_end" |
ACTION!="add", GOTO="kernel_compat_end" |
35 |
|
|
|
# this driver is broken and should not be loaded automatically |
|
|
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962 |
|
|
# needed for kernels <2.6.21 |
|
|
SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}="" |
|
|
|
|
36 |
# No need for more code, as MODALIAS is present |
# No need for more code, as MODALIAS is present |
37 |
ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" |
ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" |
38 |
|
|
39 |
|
# needed for kernel <2.6.30-rc1 |
40 |
|
SUBSYSTEM=="scsi", ATTR{type}=="8", RUN+="/sbin/modprobe -b ch" |
41 |
|
SUBSYSTEM=="mmc", RUN+="modprobe.sh -b mmc_block" |
42 |
|
|
43 |
# needed for kernel <2.6.27-rc5 |
# needed for kernel <2.6.27-rc5 |
44 |
# acpi will do on newer kernels |
# acpi will do on newer kernels |
45 |
SUBSYSTEM=="pnp", DRIVER!="?*", \ |
SUBSYSTEM=="pnp", DRIVER!="?*", \ |
46 |
RUN{ignore_error}+="/bin/sh -c 'modprobe.sh -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" |
RUN{ignore_error}+="/bin/sh -c 'modprobe.sh -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'" |
47 |
|
|
|
# needed for kernels <2.6.22 |
|
|
SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" |
|
|
|
|
|
# Parts taken from redhat-rules |
|
|
# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC |
|
|
# sr: 4 TYPE_WORM, 5 TYPE_ROM |
|
|
# st/osst: 1 TYPE_TAPE |
|
|
|
|
|
ATTRS{type}=="0|7|14", RUN+="modprobe.sh sd_mod" |
|
|
ATTRS{type}=="4|5", RUN+="modprobe.sh sr_mod" |
|
|
ATTRS{type}=="8", RUN+="modprobe.sh ch" |
|
|
|
|
|
ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ |
|
|
ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end" |
|
|
ATTRS{type}=="1", RUN+="modprobe.sh st" |
|
|
|
|
48 |
LABEL="kernel_compat_end" |
LABEL="kernel_compat_end" |