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