]> git.ipfire.org Git - ipfire-2.x.git/blame - config/install/udev/rules.d/26-modprobe.rules
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x
[ipfire-2.x.git] / config / install / udev / rules.d / 26-modprobe.rules
CommitLineData
e001bff3
MT
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
5ACTION=="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
15SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
16SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", RUN+="/sbin/modprobe st"
17SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
18SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"