]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - config/install/udev/rules.d/26-modprobe.rules
b377a6aec3d709ee7e458744022f09c0779c9c7e
[people/pmueller/ipfire-2.x.git] / config / install / udev / rules.d / 26-modprobe.rules
1 # /etc/udev/rules.d/26-modprobe.rules: Rules that require modprobe.
2
3 # Generic rule to allow loading modular drivers for existing hardware
4
5 ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
6
7 # SCSI devices require different modules, dependent on their SYSFS{type}. All
8 # of them require 'sg' though.
9 #
10 # module name sysfs types
11 # sd 0 (TYPE_DISK), 7 (TYPE_MOD), 14 (TYPE_MOD)
12 # st/osst 1 (TYPE_TAPE)
13 # sr 4 (TYPE_WORM), 5 (TYPE_ROM)
14
15 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
16 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", RUN+="/sbin/modprobe st"
17 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
18 SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"