chiark / gitweb /
6e6bf4786bc9c4e61f6f2059941d68140c6e7efa
[elogind.git] / etc / udev / udev.rules
1 # There are a number of modifiers that are allowed to be used in some of the
2 # fields.  See the udev man page for a full description of them.
3
4 # Looking for scsi bus id 42:0:0:1
5 BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1", NAME="%c"
6
7 # A usb camera.
8 BUS="usb", SYSFS{vendor}="FUJIFILM", SYSFS{model}="M100", NAME="camera%n"
9
10 # USB Epson printer to be called lp_epson
11 BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
12
13 # USB HP printer to be called lp_hp
14 BUS="usb", SYSFS{serial}="W09090207101241330", NAME="lp_hp"
15
16 # sound card with PCI bus id 00:0b.0 to be the first sound card
17 BUS="pci", ID="00:0b.0", NAME="dsp"
18
19 # sound card with PCI bus id 00:07.1 to be the second sound card
20 BUS="pci", ID="00:07.1", NAME="dsp1" 
21
22 # USB mouse plugged into the third port of the first hub to be called mouse0
23 BUS="usb", PLACE="1.3", NAME="mouse0"
24
25 # USB tablet plugged into the third port of the second hub to be called mouse1
26 BUS="usb", PLACE="2.3", NAME="mouse1"
27 BUS="usb", PLACE="2.4", NAME="mouse2"
28
29 # ttyUSB1 should always be called visor
30 KERNEL="ttyUSB1", NAME="visor"
31 KERNEL="ttyUSB0", NAME="pl2303"
32
33 # a devfs like way to name some tty devices
34 #KERNEL="ttyS*", NAME="tts/%n"
35 #KERNEL="tty*", NAME="vc/%n"
36
37 # if this is a ide cdrom, name it the default name, and create a symlink to cdrom
38 BUS="ide", KERNEL="*[!0-9]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom"
39
40 # create a symlink named after the device map name
41 # note devmap_name comes with extras/multipath
42 KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
43
44 # DRI devices always go into a subdirectory (as per the LSB spec)
45 KERNEL="card*", NAME="dri/card%n"
46
47 # alsa devices
48 KERNEL="controlC[0-9]*", NAME="snd/%k"
49 KERNEL="hw[CD0-9]*",     NAME="snd/%k"
50 KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
51 KERNEL="midi[CD0-9]*",   NAME="snd/%k"
52 KERNEL="timer",          NAME="snd/%k"
53 KERNEL="seq",            NAME="snd/%k"
54
55 # input devices
56 KERNEL="mice",          NAME="input/%k"
57 KERNEL="mouse*",        NAME="input/%k"
58 KERNEL="event*",        NAME="input/%k"
59 KERNEL="js*",           NAME="input/%k"
60 KERNEL="ts*",           NAME="input/%k"
61