chiark / gitweb /
0637dbc83a7bc0410ce3ea45bfbee9661a7ed9df
[elogind.git] / etc / udev / gentoo / 80-hotplug.rules
1 # /etc/udev/rules/80-hotplug.rules:  module loading rules for udev
2 #
3 # Gentoo specific rules
4 #
5 # There are a number of modifiers that are allowed to be used in some of the
6 # fields.  See the udev man page for a full description of them.
7 #
8 # Try not to modify this file, if you wish to change things, create a new rule
9 # file that can be run before this one.
10 #
11
12 # Module autoloading
13 ACTION!="add", GOTO="hotplug_load_end"
14
15 # check if the device has already been claimed by a driver
16 ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end"
17
18 # this driver is broken and should not be loaded automatically
19 SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_end"
20
21 # Autoload modules that lack aliases but have them defined in autoload modules
22 ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}"
23
24 # /etc/modprobe.conf.
25 SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"
26 # needed aliases are defined in /etc/modprobe.d/pnp-aliases
27
28
29 SUBSYSTEM=="i2o",  RUN+="modprobe.sh i2o_block"
30 SUBSYSTEM=="mmc",  RUN+="modprobe.sh mmc_block"
31 SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd"
32 SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms"
33 SUBSYSTEM=="ide",  ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi"
34
35 # Load driver for scsi-device
36 SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end"
37
38         # Parts taken from redhat-rules
39         # sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
40         # sr:           4 TYPE_WORM, 5 TYPE_ROM
41         # st/osst:      1 TYPE_TAPE
42
43         ATTRS{type}=="?*",      TEST!="[module/sg]", RUN+="modprobe.sh sg"
44         ATTRS{type}=="0|7|14",  RUN+="modprobe.sh sd_mod"
45         ATTRS{type}=="4|5",     RUN+="modprobe.sh sr_mod"
46         ATTRS{type}=="8",       RUN+="modprobe.sh ch"
47
48         ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
49                 ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end"
50         ATTRS{type}=="1", RUN+="modprobe.sh st"
51 LABEL="hotplug_scsi_end"
52
53 LABEL="hotplug_load_end"
54