Magellan Linux

Annotation of /tags/udev-171-r1/udev.rules.magellan

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1016 - (hide annotations) (download)
Tue Apr 6 23:46:22 2010 UTC (14 years ago) by niro
Original Path: trunk/udev/udev.rules.magellan
File size: 4954 byte(s)
-merged with upstream udev-151 rules

1 niro 121 # /etc/udev/rules/50-udev.rules: device naming rules for udev
2 niro 1016 # $Header: /root/magellan-cvs/src/udev/udev.rules.magellan,v 1.12 2010-04-06 23:46:22 niro Exp $
3 niro 121 #
4     # There are a number of modifiers that are allowed to be used in some
5     # of the different fields. They provide the following subsitutions:
6     # %n - the "kernel number" of the device.
7     # For example, 'sda3' has a "kernel number" of '3'
8     # %k - the kernel name for the device.
9     # %M - the kernel major number for the device
10     # %m - the kernel minor number for the device
11     # %b - the bus id for the device
12     # %c - the string returned by the PROGRAM. (Note, this doesn't work within
13     # the PROGRAM field for the obvious reason.)
14     # %s{filename} - the content of a sysfs attribute.
15     # %% - the '%' char itself.
16     #
17     # Try not to modify this file, if you wish to change things, create a new rule
18     # file that can be run before this one.
19     #
20 niro 760 # initramfs:default
21 niro 121
22 niro 1016 SUBSYSTEM=="block", SYMLINK{unique}+="block/%M:%m"
23     SUBSYSTEM!="block", SYMLINK{unique}+="char/%M:%m"
24 niro 121
25 niro 760 KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
26     KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660"
27     KERNEL=="ptmx", GROUP="tty", MODE="0666"
28     KERNEL=="tty", GROUP="tty", MODE="0666"
29     KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
30 niro 823 KERNEL=="console", MODE="0600"
31 niro 760 KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty"
32 niro 717
33 niro 515 # serial
34 niro 823 KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
35 niro 760 KERNEL=="ppp", MODE="0600"
36 niro 1016 KERNEL=="mwave", GROUP="dialout"
37 niro 760 KERNEL=="hvc*|hvsi*", GROUP="dialout"
38 niro 121
39 niro 1016 # virtio serial / console ports
40     KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}"
41    
42 niro 515 # mem
43     KERNEL=="null|zero|full|random|urandom", MODE="0666"
44 niro 717 KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640"
45 niro 121
46 niro 515 # input
47 niro 1016 KERNEL=="mouse*|mice|event*", MODE="0640"
48     KERNEL=="ts[0-9]*|uinput", MODE="0640"
49     KERNEL=="js[0-9]*", MODE="0644"
50 niro 121
51 niro 515 # video4linux
52 niro 717 SUBSYSTEM=="video4linux", GROUP="video"
53     KERNEL=="vttuner*", GROUP="video"
54     KERNEL=="vtx*|vbi*", GROUP="video"
55     KERNEL=="winradio*", GROUP="video"
56 niro 121
57 niro 515 # graphics
58 niro 717 KERNEL=="agpgart", MODE="0600", GROUP="video"
59     KERNEL=="pmu", GROUP="video"
60     KERNEL=="nvidia*|nvidiactl*", GROUP="video"
61     SUBSYSTEM=="graphics", GROUP="video"
62 niro 760 SUBSYSTEM=="drm", GROUP="video"
63 niro 121
64 niro 1016 # sound
65     SUBSYSTEM=="sound", GROUP="audio"
66     KERNEL=="mixer0", SYMLINK+="mixer"
67    
68 niro 760 # DVB (video)
69 niro 1016 SUBSYSTEM=="dvb", GROUP="video"
70 niro 121
71 niro 884 # FireWire (firewire-core driver: IIDC devices, AV/C devices)
72     SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video"
73     SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
74 niro 121
75 niro 1016 # FireWire (deprecated dv1394 and video1394 drivers)
76     KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n", GROUP="video"
77     KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video"
78    
79 niro 515 # libusb device nodes
80 niro 1016 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
81 niro 121
82 niro 515 # printer
83     KERNEL=="parport[0-9]*", GROUP="lp"
84     SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
85 niro 760 SUBSYSTEM=="ppdev", GROUP="lp"
86 niro 1016 SUBSYSTEM=="usb", KERNEL=="lp*", SYMLINK+="usb%k", GROUP="lp"
87 niro 760 KERNEL=="lp[0-9]*", GROUP="lp"
88 niro 515 KERNEL=="irlpt[0-9]*", GROUP="lp"
89 niro 961 # hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
90     # the ones from the old usblp kernel module
91     SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
92 niro 1016 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="0664"
93 niro 121
94 niro 760 # block
95 niro 717 SUBSYSTEM=="block", GROUP="disk"
96 niro 760
97     # floppy
98 niro 1016 SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
99 niro 760
100     # cdrom
101     SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
102 niro 884 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
103 niro 1016 KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
104     KERNEL=="pktcdvd", GROUP="cdrom"
105 niro 760
106     # tape
107     KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
108     KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
109 niro 884 SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
110 niro 760
111 niro 884 # block-related
112 niro 760 KERNEL=="sch[0-9]*", GROUP="disk"
113 niro 884 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
114 niro 760 KERNEL=="pg[0-9]*", GROUP="disk"
115 niro 515 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
116 niro 1016 KERNEL=="rawctl", GROUP="disk"
117     SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk"
118     SUBSYSTEM=="aoe", GROUP="disk", MODE="0220"
119 niro 760 SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
120 niro 121
121 niro 515 # network
122 niro 1016 KERNEL=="tun", MODE="0666"
123     KERNEL=="rfkill", MODE="0644"
124 niro 121
125 niro 515 # CPU
126 niro 1016 KERNEL=="cpu[0-9]*", MODE="0444"
127 niro 121
128 niro 515 # miscellaneous
129     KERNEL=="fuse", MODE="0666"
130 niro 760 SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
131 niro 515 KERNEL=="mmtimer", MODE="0644"
132     KERNEL=="rflash[0-9]*", MODE="0400"
133     KERNEL=="rrom[0-9]*", MODE="0400"
134 niro 121
135 niro 515 # do not delete static device nodes
136 niro 1016 ACTION=="remove", NAME=="", TEST=="/lib/udev/devices/%k", OPTIONS+="ignore_remove"
137 niro 515 ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"