chiark / gitweb /
[PATCH] move the config files to etc/udev to clean up main directory a bit.
[elogind.git] / etc / udev / udev.rules
1 # There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
2 # They provide the following subsitutions:
3 # %n - the "kernel number" of the device.
4 #      for example, 'sda3' has a "kernel number" of '3'
5 # %k - the kernel name for the device.
6 # %M - the kernel major number for the device
7 # %m - the kernel minor number for the device
8 # %b - the bus id for the device
9 # %c - the return value for the CALLOUT program (note, this doesn't work within
10 #      the PROGRAM field for the obvious reason.)
11 # %D - use the devfs style disk name for this device.
12 #      For partitions, this will result in 'part%n'
13 #      If this is not a partition, it will result in 'disc'
14 #
15
16 # Looking for scsi bus id 42:0:0:1
17 CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n test-%b", ID="test-42:0:0:1", NAME="%c"
18
19 # A usb camera.
20 LABEL, BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
21
22 # USB Epson printer to be called lp_epson
23 LABEL, BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
24
25 # USB HP printer to be called lp_hp
26 LABEL, BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
27
28 # sound card with PCI bus id 00:0b.0 to be the first sound card
29 NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
30
31 # sound card with PCI bus id 00:07.1 to be the second sound card
32 NUMBER, BUS="pci", ID="00:07.1", NAME="dsp1" 
33
34 # USB mouse plugged into the third port of the first hub to be called mouse0
35 TOPOLOGY, BUS="usb", PLACE="1.3", NAME="mouse0"
36
37 # USB tablet plugged into the third port of the second hub to be called mouse1
38 TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
39 TOPOLOGY, BUS="usb", PLACE="2.4", NAME="mouse2"
40
41 # ttyUSB1 should always be called visor
42 REPLACE, KERNEL="ttyUSB1", NAME="visor"
43 REPLACE, KERNEL="ttyUSB0", NAME="pl2303"
44
45 # a devfs like way to name some tty devices
46 #REPLACE, KERNEL="ttyS*", NAME="tts/%n"
47 #REPLACE, KERNEL="tty*", NAME="vc/%n"
48
49