]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - config/mkinitcpio/udev.rules
Add Huawei Android usbid's to option driver.
[people/pmueller/ipfire-2.x.git] / config / mkinitcpio / udev.rules
CommitLineData
ee78a5ef
MT
1# Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
2#
3# This ruleset should provide a DevFS-compatible device tree.
4#
5# There are a number of modifiers that are allowed to be used in some
6# of the different fields. They provide the following subsitutions:
7#
8# %n the "kernel number" of the device.
9# For example, 'sda3' has a "kernel number" of '3'
10# %k the kernel name for the device.
11# %M the kernel major number for the device
12# %m the kernel minor number for the device
13# %b the bus id for the device
14# %c the string returned by the PROGRAM
15# %s{filename} the content of a sysfs attribute.
16# %% the '%' char itself.
17#
18# There are a number of modifiers that are allowed to be used in some of the
19# fields. See the udev man page for a full description of them.
20# global stuff
21#
22
23#####################################
24# Early rules - begin
25#####################################
26# wait for sysfs
27ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
28ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
29
30#####################################
31# Early rules -end
32#####################################
33
34#####################################
35###### Hotplug rules - begin
36#####################################
37# check if the device has already been claimed by a driver
38ENV{PHYSDEVDRIVER}=="?*", GOTO="hotplug_driver_loaded"
39
40# Modaliases to load
41ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
42# SCSI addon modules
43ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[07]", RUN+="/lib/udev/load-modules.sh sd_mod"
44ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="14", RUN+="/lib/udev/load-modules.sh sd_mod"
45ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[45]", RUN+="/lib/udev/load-modules.sh sr_mod"
46ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", SYSFS{model}!="ADR*", RUN+="/lib/udev/load-modules.sh osst"
47ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}=="Onstream", SYSFS{model}=="ADR*", RUN+="/lib/udev/load-modules.sh st"
48ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="1", SYSFS{vendor}!="Onstream", RUN+="/lib/udev/load-modules.sh st"
49ACTION=="add", SUBSYSTEM=="scsi", SYSFS{type}=="[23689]", RUN+="/lib/udev/load-modules.sh sg"
50
51LABEL="hotplug_driver_loaded"
52
53# FIRMWARE
54ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="?*", RUN+="/lib/udev/firmware.sh"
55#####################################
56##### Hotplug rules - end
57#####################################
58
59#####################################
60###### CD/DVD symlinks - begin
61#####################################
62ACTION=="add", BUS=="ide", KERNEL=="hd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode"
63ACTION=="add", BUS=="scsi", KERNEL=="sr[0-9]*", IMPORT="/lib/udev/cdrom_id --export $tempnode"
64ACTION=="add", BUS=="scsi", KERNEL=="scd[a-z]", IMPORT="/lib/udev/cdrom_id --export $tempnode"
65ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b"
66ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b"
67ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b"
68ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvd-%b"
69#####################################
70###### CD/DVD symlinks - end
71#####################################