chiark / gitweb /
65a89ae5932e45d4a7b495e13fa87118f9369c57
[elogind.git] / etc / udev / udev.rules.debian
1 # There are a number of modifiers that are allowed to be used in some
2 # of the different fields. They provide the following subsitutions:
3 #
4 # %n the "kernel number" of the device.
5 #    For example, 'sda3' has a "kernel number" of '3'
6 # %e the smallest number for that name which does not matches an existing node
7 # %k the kernel name for the device.
8 # %M the kernel major number for the device
9 # %m the kernel minor number for the device
10 # %b the bus id for the device
11 # %c the string returned by the PROGRAM
12 # %s{filename} the content of a sysfs attribute.
13 # %% the '%' char itself.
14 #
15
16 # permissions for IDE CD devices
17 BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", MODE="0660", GROUP="cdrom"
18
19 # permissions for IDE floppy devices
20 BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy*", NAME="%k", MODE="0660", GROUP="floppy"
21
22 # permissions for SCSI CD devices
23 BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", NAME="scd%n", MODE="0660", GROUP="cdrom", SYMLINK="sr%n"
24 BUS="scsi", KERNEL="sg[0-9]*", SYSFS{type}="5", NAME="%k", MODE="0660", GROUP="cdrom"
25
26
27 # USB devices
28 BUS="usb", KERNEL="hiddev*",    NAME="usb/%k"
29 BUS="usb", KERNEL="auer*",      NAME="usb/%k"
30 BUS="usb", KERNEL="legousbtower*", NAME="usb/%k"
31 BUS="usb", KERNEL="dabusb*",    NAME="usb/%k"
32 BUS="usb", KERNEL="lp[0-9]*",   NAME="usb/%k"
33 BUS="usb", KERNEL="cpad[0-9]*", NAME="usb/%k"
34
35 KERNEL="dvb*",          PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"
36
37 KERNEL="card*",         NAME="dri/card%n"
38 KERNEL="cdemu[0-9]*",   NAME="cdemu/%n"
39 KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%n"
40 KERNEL="pktcdvd",       NAME="pktcdvd/control"
41 KERNEL="cpu[0-9]*",     NAME="cpu/%n/cpuid"
42 KERNEL="msr[0-9]*",     NAME="cpu/%n/msr"
43 KERNEL="microcode",     NAME="cpu/microcode"
44
45 # ALSA devices
46 KERNEL="controlC[0-9]*", NAME="snd/%k"
47 KERNEL="hwC[D0-9]*",    NAME="snd/%k"
48 KERNEL="pcmC[D0-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 # input devices
54 KERNEL="mice",          NAME="input/%k"
55 KERNEL="mouse[0-9]*",   NAME="input/%k"
56 KERNEL="event[0-9]*",   NAME="input/%k", PROGRAM="/etc/udev/scripts/inputdev.sh %k", RESULT="inputdev", MODE="0664", GROUP="video"
57 KERNEL="event[0-9]*",   NAME="input/%k"
58 KERNEL="js[0-9]*",      NAME="input/%k"
59 KERNEL="ts[0-9]*",      NAME="input/%k"
60 KERNEL="uinput",        NAME="input/%k"
61
62 KERNEL="tap[0-9]*",     NAME="net/%k"
63 KERNEL="tun",           NAME="net/%k"
64
65 # CAPI devices
66 KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
67 KERNEL="capi[0-9]*",    NAME="capi/%n"
68
69 # Zaptel
70 KERNEL="zapctl",        NAME="zap/ctl"
71 KERNEL="zaptimer",      NAME="zap/timer"
72 KERNEL="zapchannel",    NAME="zap/channel"
73 KERNEL="zappseudo",     NAME="zap/pseudo"
74 KERNEL="zap[0-9]*",     NAME="zap/%n"
75
76 # device mapper creates its own device nodes, so ignore these
77 KERNEL="dm-[0-9]*",     NAME=""
78 KERNEL="device-mapper", NAME="mapper/control"
79