source: udev/50-udev.rules@ 7467862

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7467862 was 7467862, checked in by Jim Gifford <clfs@…>, 19 years ago

r1003@server (orig r1001): jim | 2006-01-04 21:37:34 -0800

r1273@server: jim | 2006-01-04 21:34:11 -0800
Added: hotplug support


  • Property mode set to 100644
File size: 7.1 KB
Line 
1########################################################################
2#
3# Description : Base Udev Rules Set
4#
5# Authors : Based on Open Suse Udev Rules
6# kay.sievers@suse.de
7#
8# Adapted to : Jim Gifford
9# LFS
10#
11# Version : 00.01
12#
13# Notes :
14#
15########################################################################
16
17# hotplug
18ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
19
20# console
21KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
22KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
23KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
24KERNEL=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
25KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
26KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
27KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
28KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
29
30# serial devices
31KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
32KERNEL=="pppox*", NAME="%k", GROUP="uucp"
33KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
34KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
35KERNEL=="hvc*", NAME="%k", GROUP="uucp"
36KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
37KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
38KERNEL=="ttyUSB*", SYSFS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
39
40# video/graphics
41SUBSYSTEM=="video4linux", GROUP="video"
42SUBSYSTEM=="graphics" GROUP="video"
43KERNEL=="vtx*", NAME="%k", GROUP="video"
44KERNEL=="vbi*", NAME="%k", GROUP="video"
45KERNEL=="winradio*", NAME="%k", GROUP="video"
46KERNEL=="vttuner*", NAME="%k", GROUP="video"
47KERNEL=="nvidia*", NAME="%k", GROUP="video"
48KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
49KERNEL=="video0", SYMLINK+="video"
50KERNEL=="radio0", SYMLINK+="radio"
51KERNEL=="vbi0", SYMLINK+="vbi"
52KERNEL=="pmu", GROUP="video"
53
54# dvb
55SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
56
57# input devices
58KERNEL=="mice", NAME="input/%k", MODE="0640"
59KERNEL=="mouse*", NAME="input/%k", MODE="0640"
60KERNEL=="event*", NAME="input/%k", MODE="0640"
61KERNEL=="js*", NAME="input/%k", MODE="0644"
62KERNEL=="ts*", NAME="input/%k", MODE="0600"
63KERNEL=="uinput", NAME="input/%k", MODE="0600"
64KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
65KERNEL=="input[0-9]*", ACTION=="add", RUN+="input.sh"
66
67# printer
68SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
69SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
70KERNEL=="irlpt*", NAME="%k", GROUP="lp"
71
72# cpu devices
73KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
74KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
75KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
76
77# IEEE1394 devices
78KERNEL=="raw1394*", NAME="%k", GROUP="video"
79KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
80KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
81
82# 183 = /dev/hwrng Generic random number generator
83KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
84# 219 /dev/modems/mwave MWave modem firmware upload
85KERNEL=="mwave", NAME="modems/%k"
86# 169 /dev/specialix_rioctl Specialix RIO serial control
87KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
88# 167 /dev/specialix_sxctl Specialix serial control
89KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
90
91# network
92KERNEL=="tun", NAME="net/%k", MODE="0600"
93
94# misc devices
95KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
96KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
97KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
98KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
99KERNEL=="null", NAME="%k", MODE="666"
100KERNEL=="zero", NAME="%k", MODE="666"
101KERNEL=="full", NAME="%k", MODE="622"
102KERNEL=="random", NAME="%k", MODE="666"
103KERNEL=="urandom", NAME="%k", MODE="644"
104KERNEL=="rtc", GROUP="audio"
105KERNEL=="sonypi", MODE="0666"
106KERNEL=="agpgart", MODE="0600", GROUP="video"
107KERNEL=="djs*", NAME="%k", MODE="644"
108KERNEL=="sgi_*", NAME="%k", MODE="666"
109KERNEL=="rrom*", NAME="%k", MODE="400"
110KERNEL=="rflash*", NAME="%k", MODE="400"
111KERNEL=="usbscanner*", NAME="%k", MODE="644"
112KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
113KERNEL=="3270/tub*", NAME="%k", MODE="666"
114KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
115KERNEL=="ica", NAME="%k", MODE="666"
116KERNEL=="z90crypt", NAME="%k", MODE="666"
117KERNEL=="mmtimer", NAME="%k", MODE="444"
118KERNEL=="auer[0-9]*" NAME="usb/%k"
119
120# packet writing interface
121KERNEL=="pktcdvd", NAME="pktcdvd/control"
122KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
123
124# fix floppy devices
125KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
126KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
127KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
128
129# block devices
130SUBSYSTEM=="block", GROUP="disk", MODE="0640"
131
132# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
133# sr: 4 TYPE_WORM, 5 TYPE_ROM
134# st/osst: 1 TYPE_TAPE
135ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
136ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
137SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
138SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
139SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
140SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
141SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
142
143# load IDE modules
144SUBSYSTEM=="ide", ACTION=="add", RUN+="ide.sh"
145
146# device mapper
147KERNEL=="device-mapper", NAME="%k", SYMLINK+="mapper/control"
148
149# misc storage devices (non-block)
150KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
151KERNEL=="st*", NAME="%k", GROUP="disk"
152KERNEL=="nst*", NAME="%k", GROUP="disk"
153KERNEL=="initrd", NAME="%k", GROUP="disk"
154KERNEL=="qft*", NAME="%k", GROUP="disk"
155KERNEL=="nqft*", NAME="%k", GROUP="disk"
156KERNEL=="zqft*", NAME="%k", GROUP="disk"
157KERNEL=="nzqft*", NAME="%k", GROUP="disk"
158KERNEL=="rawqft*", NAME="%k", GROUP="disk"
159KERNEL=="nrawqft*", NAME="%k", GROUP="disk"
160KERNEL=="pf*", NAME="%k", GROUP="disk"
161KERNEL=="sch*", NAME="%k", GROUP="disk"
162KERNEL=="pt*", NAME="%k", GROUP="disk"
163KERNEL=="npt*", NAME="%k", GROUP="disk"
164KERNEL=="pg*", NAME="%k", GROUP="disk"
165KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
166KERNEL=="rawctl*", NAME="%k", GROUP="disk"
167KERNEL=="osst*", NAME="%k", GROUP="disk"
168KERNEL=="nosst*", NAME="%k", GROUP="disk"
169KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
170KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
171KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
172
173# libusb device access
174SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
175
176# kernel firmware loader
177SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper"
Note: See TracBrowser for help on using the repository browser.