chiark / gitweb /
cdrom_id: add and use ID_CDROM_MEDIA to decide if we run vol_id
[elogind.git] / rules / rules.d / 50-udev-default.rules
1 # do not edit this file, it will be overwritten on update
2 # initramfs:default
3
4 SUBSYSTEM=="block", SYMLINK+="block/%M:%m"
5 SUBSYSTEM!="block", SYMLINK+="char/%M:%m"
6
7 KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
8 KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
9 KERNEL=="ptmx",                 GROUP="tty", MODE="0666"
10 KERNEL=="tty",                  GROUP="tty", MODE="0666"
11 KERNEL=="tty[0-9]*",            GROUP="tty", MODE="0620"
12 KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty"
13 KERNEL=="console",              MODE="0600"
14
15 # serial
16 KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*", GROUP="dialout"
17 KERNEL=="ppp",                  MODE="0600"
18 KERNEL=="mwave",                NAME="modems/mwave", GROUP="dialout"
19 KERNEL=="hvc*|hvsi*",           GROUP="dialout"
20
21 # mem
22 KERNEL=="null|zero|full|random|urandom", MODE="0666"
23 KERNEL=="mem|kmem|port|nvram",  GROUP="kmem", MODE="0640"
24
25 # input
26 KERNEL=="mouse*|mice|event*",   NAME="input/%k", MODE="0640"
27 KERNEL=="ts[0-9]*|uinput",      NAME="input/%k", MODE="0640"
28 KERNEL=="js[0-9]*",             NAME="input/%k", MODE="0644"
29
30 # video4linux
31 SUBSYSTEM=="video4linux",       GROUP="video"
32 KERNEL=="vttuner*",             GROUP="video"
33 KERNEL=="vtx*|vbi*",            GROUP="video"
34 KERNEL=="winradio*",            GROUP="video"
35
36 # graphics
37 KERNEL=="agpgart",              MODE="0600", GROUP="video"
38 KERNEL=="card[0-9]*",           NAME="dri/%k"
39 KERNEL=="pmu",                  GROUP="video"
40 KERNEL=="nvidia*|nvidiactl*",   GROUP="video"
41 SUBSYSTEM=="graphics",          GROUP="video"
42 SUBSYSTEM=="drm",               GROUP="video"
43
44 # DVB (video)
45 SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video"
46
47 # Firewire
48 KERNEL=="dv1394[0-9]*",         NAME="dv1394/%n", GROUP="video"
49 KERNEL=="video1394[0-9]*",      NAME="video1394/%n", GROUP="video"
50
51 # libusb device nodes
52 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664"
53
54 # printer
55 KERNEL=="parport[0-9]*",        GROUP="lp"
56 SUBSYSTEM=="printer",           KERNEL=="lp*", GROUP="lp"
57 SUBSYSTEM=="ppdev",             GROUP="lp"
58 SUBSYSTEM=="usb",               KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
59 KERNEL=="lp[0-9]*",             GROUP="lp"
60 KERNEL=="irlpt[0-9]*",          GROUP="lp"
61
62 # block
63 SUBSYSTEM=="block", GROUP="disk"
64
65 # floppy
66 KERNEL=="fd[0-9]", GROUP="floppy"
67 KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
68 KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
69
70 # cdrom
71 SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
72 SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
73 SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
74 KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
75 KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom"
76
77 # tape
78 KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
79 KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
80 SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
81
82 # block-releated
83 KERNEL=="sch[0-9]*", GROUP="disk"
84 SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
85 KERNEL=="pg[0-9]*", GROUP="disk"
86 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
87 KERNEL=="rawctl", NAME="raw/rawctl", GROUP="disk"
88 SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
89 SUBSYSTEM=="bsg", NAME="bsg/%k"
90 SUBSYSTEM=="aoe", NAME="etherd/%k", GROUP="disk", MODE="0220"
91 SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
92
93 # network
94 KERNEL=="tun",                  NAME="net/%k", MODE="0666"
95
96 # CPU
97 KERNEL=="cpu[0-9]*",            NAME="cpu/%n/cpuid"
98 KERNEL=="msr[0-9]*",            NAME="cpu/%n/msr"
99 KERNEL=="microcode",            NAME="cpu/microcode", MODE="0600"
100
101 # miscellaneous
102 KERNEL=="fuse",                 MODE="0666"
103 SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
104 KERNEL=="auer[0-9]*",           NAME="usb/%k"
105 KERNEL=="hw_random",            NAME="hwrng"
106 KERNEL=="mmtimer",              MODE="0644"
107 KERNEL=="rflash[0-9]*",         MODE="0400"
108 KERNEL=="rrom[0-9]*",           MODE="0400"
109 KERNEL=="sxctl",                NAME="specialix_sxctl"
110 KERNEL=="rioctl",               NAME="specialix_rioctl"
111 KERNEL=="iowarrior[0-9]*",      NAME="usb/%k"
112 KERNEL=="hiddev[0-9]*",         NAME="usb/%k"
113 KERNEL=="legousbtower[0-9]*",   NAME="usb/%k"
114 KERNEL=="dabusb[0-9]*",         NAME="usb/%k"
115 KERNEL=="usbdpfp[0-9]*",        NAME="usb/%k"
116 KERNEL=="cpad[0-9]*",           NAME="usb/%k"
117
118 # do not delete static device nodes
119 ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"
120 ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove"