chiark / gitweb /
fix udevstart and let all events trvel trough udev
[elogind.git] / etc / udev / gentoo / udev.rules
1 # /etc/udev/udev.rules:  device naming rules for udev
2 #
3 # Gentoo specific rules, based a bit on devfs rules, but much simpler.
4 #
5 # There are a number of modifiers that are allowed to be used in some of the
6 # fields.  See the udev man page for a full description of them.
7
8
9 ###########################################################
10 #
11 # For devfs similar /dev layout (neater)
12 #
13 ###########################################################
14
15 # all block devices
16 SUBSYSTEM="block", GROUP="disk"
17
18 # cdrom symlinks and other good cdrom naming
19 BUS="ide",  KERNEL="hd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
20 BUS="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
21 BUS="scsi", KERNEL="scd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
22
23 # devfs-names for ide-devices (uncomment only one)
24 #  /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
25 BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}", GROUP="%c{3}"
26
27 # disk devices
28 KERNEL="sd*",           NAME="%k", GROUP="disk"
29 KERNEL="dasd*",         NAME="%k", GROUP="disk"
30 KERNEL="ataraid*",      NAME="%k", GROUP="disk"
31
32 # compaq smart array
33 KERNEL="cciss*",        PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", NAME="%c{1}", SYMLINK="%k"
34 KERNEL="ida*",          PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", NAME="%c{1}", SYMLINK="%k"
35
36 # mylex
37 KERNEL="rd*",           PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", NAME="%c{1}", SYMLINK="%k"
38
39 # dri devices
40 KERNEL="card*",         NAME="dri/card%n", GROUP="video"
41 KERNEL="nvidia*",       NAME="%k", GROUP="video"
42 KERNEL="3dfx*",         NAME="%k", GROUP="video"
43
44 # alsa devices
45 SUBSYSTEM="sound", GROUP="audio"
46 KERNEL="controlC[0-9]*",        NAME="snd/%k"
47 KERNEL="hw[CD0-9]*",            NAME="snd/%k"
48 KERNEL="pcm[CD0-9cp]*",         NAME="snd/%k"
49 KERNEL="midiC[D0-9]*",          NAME="snd/%k"
50 KERNEL="timer",                 NAME="snd/%k"
51 KERNEL="seq",                   NAME="snd/%k"
52
53 # capi devices
54 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
55 KERNEL="capi*",         NAME="capi/%n"
56
57 # cpu devices
58 KERNEL="cpu[0-9]*",     NAME="cpu/%n/cpuid"
59 KERNEL="msr[0-9]*",     NAME="cpu/%n/msr"
60 KERNEL="microcode",     NAME="cpu/microcode"
61
62 # dm devices (ignore them)
63 KERNEL="dm-[0-9]*",     NAME=""
64 # create a symlink named after the device map name
65 # note devmap_name comes with extras/multipath
66 #KERNEL="dm-[0-9]*",    PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
67 KERNEL="device-mapper", NAME="mapper/control"
68
69 # fb devices
70 KERNEL="fb[0-9]*",      NAME="fb/%n", SYMLINK="%k", GROUP="video"
71
72 # floppy devices
73 KERNEL="fd[0-9]*",      NAME="floppy/%n", SYMLINK="%k", GROUP="floppy"
74
75 # i2c devices
76 KERNEL="i2c-[0-9]*",    NAME="i2c/%n", SYMLINK="%k"
77
78 # input devices
79 KERNEL="mice",          NAME="input/%k", MODE="0644"
80 KERNEL="mouse*",        NAME="input/%k", MODE="0644"
81 KERNEL="event*",        NAME="input/%k", MODE="0600"
82 KERNEL="js*",           NAME="input/%k", MODE="664"
83 KERNEL="ts*",           NAME="input/%k", MODE="0600"
84
85 # loop devices
86 KERNEL="loop[0-9]*",    NAME="loop/%n", SYMLINK="%k", GROUP="disk"
87
88 # md block devices
89 KERNEL="md[0-9]*",      NAME="md/%n", SYMLINK="%k", GROUP="disk"
90
91 # aoe char devices,
92 SUBSYSTEM="aoe", KERNEL="discover",     NAME="etherd/%k", GROUP="disk", MODE="0220"
93 SUBSYSTEM="aoe", KERNEL="err",          NAME="etherd/%k", GROUP="disk", MODE="0440"
94 SUBSYSTEM="aoe", KERNEL="interfaces",   NAME="etherd/%k", GROUP="disk", MODE="0220"
95
96 # misc devices
97 KERNEL="agpgart",       NAME="misc/%k", SYMLINK="%k"
98 KERNEL="psaux",         NAME="misc/%k", SYMLINK="%k"
99 KERNEL="rtc",           NAME="misc/%k", SYMLINK="%k", MODE="0664"
100 KERNEL="uinput",        NAME="misc/%k", SYMLINK="%k"
101 KERNEL="inotify",       NAME="misc/%k", SYMLINK="%k", MODE="0666"
102
103 # netlink devices
104 KERNEL="route",         NAME="netlink/%k"
105 KERNEL="skip",          NAME="netlink/%k"
106 KERNEL="usersock",      NAME="netlink/%k"
107 KERNEL="fwmonitor",     NAME="netlink/%k"
108 KERNEL="tcpdiag",       NAME="netlink/%k"
109 KERNEL="nflog",         NAME="netlink/%k"
110 KERNEL="xfrm",          NAME="netlink/%k"
111 KERNEL="arpd",          NAME="netlink/%k"
112 KERNEL="route6",        NAME="netlink/%k"
113 KERNEL="ip6_fw",        NAME="netlink/%k"
114 KERNEL="dnrtmsg",       NAME="netlink/%k"
115 KERNEL="tap*",          NAME="netlink/%k"
116
117 # network devices
118 KERNEL="tun",           NAME="net/%k"
119
120 # ramdisk devices
121 KERNEL="ram[0-9]*",     NAME="rd/%n", SYMLINK="%k"
122
123 # raw devices
124 KERNEL="raw[0-9]*",     NAME="raw/%k", GROUP="disk"
125 KERNEL="ram*",          NAME="%k", GROUP="disk"
126
127 # sound devices
128 KERNEL="adsp",                  NAME="sound/%k", SYMLINK="%k", GROUP="audio"
129 KERNEL="adsp[0-9]*",            NAME="sound/%k", SYMLINK="%k", GROUP="audio"
130 KERNEL="audio",                 NAME="sound/%k", SYMLINK="%k", GROUP="audio"
131 KERNEL="audio[0-9]*",           NAME="sound/%k", SYMLINK="%k", GROUP="audio"
132 KERNEL="dsp",                   NAME="sound/%k", SYMLINK="%k", GROUP="audio"
133 KERNEL="dsp[0-9]*",             NAME="sound/%k", SYMLINK="%k", GROUP="audio"
134 KERNEL="mixer",                 NAME="sound/%k", SYMLINK="%k", GROUP="audio"
135 KERNEL="mixer[0-9]*",           NAME="sound/%k", SYMLINK="%k", GROUP="audio"
136 KERNEL="sequencer",             NAME="sound/%k", SYMLINK="%k", GROUP="audio"
137 KERNEL="sequencer[0-9]*",       NAME="sound/%k", SYMLINK="%k", GROUP="audio"
138
139 # tty devices
140 KERNEL="console",       NAME="%k", GROUP="tty", MODE="0600"
141 KERNEL="tty",           NAME="%k", GROUP="tty", MODE="0666"
142 KERNEL="tty[0-9]*",     NAME="vc/%n",  SYMLINK="%k", GROUP="tty"
143 KERNEL="ttyS[0-9]*",    NAME="tts/%n", SYMLINK="%k", GROUP="tty"
144 KERNEL="ttyUSB[0-9]*",  NAME="tts/USB%n", GROUP="tty", MODE="0600"
145 KERNEL="ippp0",         NAME="%k", GROUP="tty"
146 KERNEL="isdn*",         NAME="%k", GROUP="tty"
147 KERNEL="dcbri*",        NAME="%k", GROUP="tty"
148 KERNEL="ircomm*",       NAME="%k", GROUP="tty"
149
150 # pty devices
151 KERNEL="ptmx",                  NAME="%k", GROUP="tty", MODE="0666"
152 KERNEL="pty[p-za-e][0-9a-f]*",  NAME="pty/m%n", SYMLINK="%k", GROUP="tty"
153 KERNEL="tty[p-za-e][0-9a-f]*",  NAME="pty/s%n", SYMLINK="%k", GROUP="tty"
154
155 # vc devices
156 KERNEL="vcs",           NAME="vcc/0",   SYMLINK="%k", GROUP="tty"
157 KERNEL="vcs[0-9]*",     NAME="vcc/%n",  SYMLINK="%k", GROUP="tty"
158 KERNEL="vcsa",          NAME="vcc/a0",  SYMLINK="%k", GROUP="tty"
159 KERNEL="vcsa[0-9]*",    NAME="vcc/a%n", SYMLINK="%k", GROUP="tty"
160
161 # memory devices
162 KERNEL="random",        NAME="%k", MODE="0666"
163 KERNEL="urandom",       NAME="%k", MODE="0444"
164 KERNEL="mem",           NAME="%k", MODE="0640"
165 KERNEL="kmem",          NAME="%k", MODE="0640"
166 KERNEL="port",          NAME="%k", MODE="0640"
167 KERNEL="full",          NAME="%k", MODE="0666"
168 KERNEL="null",          NAME="%k", MODE="0666"
169 KERNEL="zero",          NAME="%k", MODE="0666"
170
171 # usb devices
172 KERNEL="hiddev*",               NAME="usb/%k"
173 KERNEL="auer*",                 NAME="usb/%k"
174 KERNEL="legousbtower*",         NAME="usb/%k", GROUP="usb"
175 KERNEL="dabusb*",               NAME="usb/%k"
176 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k", GROUP="lp"
177
178 # v4l devices
179 KERNEL="video[0-9]*",   NAME="v4l/video%n", SYMLINK="video%n", GROUP="video"
180 KERNEL="radio[0-9]*",   NAME="v4l/radio%n", GROUP="video"
181 KERNEL="vbi[0-9]*",     NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video"
182 KERNEL="vtx[0-9]*",     NAME="v4l/vtx%n", GROUP="video"
183
184 # dvb devices
185 KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video", MODE="0660"
186
187 # Asterix Zaptel devices
188 KERNEL="zapctl",        NAME="zap/ctl"
189 KERNEL="zaptimer",      NAME="zap/timer"
190 KERNEL="zapchannel",    NAME="zap/channel"
191 KERNEL="zappseudo",     NAME="zap/pseudo"
192 KERNEL="zap[0-9]*",     NAME="zap/%n"
193
194 # pilot/palm devices
195 KERNEL="pilot",         NAME="%k", GROUP="uucp"
196
197 # jaz devices
198 KERNEL="jaz*",          NAME="%k", GROUP="disk"
199
200 # zip devices
201 KERNEL="pocketzip*",    NAME="%k", GROUP="disk"
202 KERNEL="zip*",          NAME="%k", GROUP="disk"
203
204 # ls120 devices
205 KERNEL="ls120",         NAME="%k", GROUP="disk"
206
207 # lp devices
208 KERNEL="lp*",           NAME="%k", GROUP="lp"
209 KERNEL="irlpt",         NAME="%k", GROUP="lp"
210 KERNEL="usblp",         NAME="%k", GROUP="lp"
211 KERNEL="lp*",           NAME="%k", GROUP="lp"
212
213 # tape devices
214 KERNEL="ht*",           NAME="%k", GROUP="tape"
215 KERNEL="nht*",          NAME="%k", GROUP="tape"
216 KERNEL="pt*",           NAME="%k", GROUP="tape"
217 KERNEL="npt*",          NAME="%k", GROUP="tape"
218 KERNEL="st*",           NAME="%k", GROUP="tape"
219 KERNEL="nst*",          NAME="%k", GROUP="tape"
220 KERNEL="osst*",         NAME="%k", GROUP="tape"
221 KERNEL="nosst*",        NAME="%k", GROUP="tape"
222
223 # diskonkey devices
224 KERNEL="diskonkey*",    NAME="%k", GROUP="disk"
225
226 # rem_ide devices
227 KERNEL="microdrive*",   NAME="%k", GROUP="disk"
228
229 # kbd devices
230 KERNEL="kbd",           NAME="%k", MODE="0664"
231
232 # Sony Vaio Jogdial sonypi device
233 KERNEL="sonypi",        NAME="%k", MODE="0666"
234
235 # packet devices
236 KERNEL="pktcdvd",       NAME="pktcdvd/control", GROUP="cdrw", MODE="0660"
237 KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="cdrw", MODE="0660"
238
239 # infiniband devices
240 KERNEL="umad*", NAME="infiniband/%k"
241 KERNEL="issm*", NAME="infiniband/%k"