Annotation of /trunk/udev/udev-kernel-compat.rules.magellan
Parent Directory | Revision Log
Revision 516 -
(hide annotations)
(download)
Sat Mar 22 18:13:36 2008 UTC (16 years, 6 months ago) by niro
File size: 2328 byte(s)
Sat Mar 22 18:13:36 2008 UTC (16 years, 6 months ago) by niro
File size: 2328 byte(s)
-new file; merged with upstream udev-119 rules
1 | niro | 516 | # /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.1 2008-03-22 18:13:36 niro Exp $ | ||
3 | # | ||
4 | # There are a number of modifiers that are allowed to be used in some | ||
5 | # of the different fields. They provide the following subsitutions: | ||
6 | # %n - the "kernel number" of the device. | ||
7 | # For example, 'sda3' has a "kernel number" of '3' | ||
8 | # %k - the kernel name for the device. | ||
9 | # %M - the kernel major number for the device | ||
10 | # %m - the kernel minor number for the device | ||
11 | # %b - the bus id for the device | ||
12 | # %c - the string returned by the PROGRAM. (Note, this doesn't work within | ||
13 | # the PROGRAM field for the obvious reason.) | ||
14 | # %s{filename} - the content of a sysfs attribute. | ||
15 | # %% - the '%' char itself. | ||
16 | # | ||
17 | # Try not to modify this file, if you wish to change things, create a new rule | ||
18 | # file that can be run before this one. | ||
19 | # | ||
20 | |||
21 | ACTION!="add", GOTO="kernel_compat_end" | ||
22 | |||
23 | # workarounds needed to synchronize with sysfs | ||
24 | DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" | ||
25 | |||
26 | # needed for kernels <2.6.16 | ||
27 | SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" | ||
28 | |||
29 | # needed for kernels <2.6.17 | ||
30 | SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" | ||
31 | |||
32 | # needed for kernels <2.6.22 | ||
33 | 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" | ||
34 | |||
35 | # this driver is broken and should not be loaded automatically | ||
36 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962 | ||
37 | # needed for kernels <2.6.21 | ||
38 | SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}="" | ||
39 | |||
40 | # No need for more code, as MODALIAS is present | ||
41 | ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" | ||
42 | |||
43 | # needed for kernels <2.6.22 | ||
44 | SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" | ||
45 | |||
46 | # Parts taken from redhat-rules | ||
47 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC | ||
48 | # sr: 4 TYPE_WORM, 5 TYPE_ROM | ||
49 | # st/osst: 1 TYPE_TAPE | ||
50 | |||
51 | ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod" | ||
52 | ATTRS{type}=="4|5", RUN+="/sbin/modprobe sr_mod" | ||
53 | ATTRS{type}=="8", RUN+="/sbin/modprobe ch" | ||
54 | |||
55 | ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ | ||
56 | ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst", GOTO="kernel_compat_end" | ||
57 | ATTRS{type}=="1", RUN+="/sbin/modprobe st" | ||
58 | |||
59 | LABEL="kernel_compat_end" |