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