Magellan Linux

Contents of /tags/udev-162-r2/udev.rules.magellan

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1129 - (show annotations) (download)
Mon Sep 13 21:44:07 2010 UTC (13 years, 6 months ago) by niro
File size: 4774 byte(s)
tagged 'udev-162-r2'
1 # /etc/udev/rules/50-udev.rules: device naming rules for udev
2 # $Header: /root/magellan-cvs/src/udev/udev.rules.magellan,v 1.13 2010-08-18 02:24:13 niro Exp $
3 #
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 # initramfs:default
21
22 SUBSYSTEM=="block", SYMLINK{unique}+="block/%M:%m"
23 SUBSYSTEM!="block", SYMLINK{unique}+="char/%M:%m"
24
25 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 KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty"
31
32 # serial
33 KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
34 KERNEL=="mwave", GROUP="dialout"
35 KERNEL=="hvc*|hvsi*", GROUP="dialout"
36
37 # virtio serial / console ports
38 KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
39
40 # mem
41 KERNEL=="null|zero|full|random|urandom", MODE="0666"
42 KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640"
43
44 # input
45 KERNEL=="mouse*|mice|event*", MODE="0640"
46 KERNEL=="ts[0-9]*|uinput", MODE="0640"
47 KERNEL=="js[0-9]*", MODE="0644"
48
49 # video4linux
50 SUBSYSTEM=="video4linux", GROUP="video"
51 KERNEL=="vttuner*", GROUP="video"
52 KERNEL=="vtx*|vbi*", GROUP="video"
53 KERNEL=="winradio*", GROUP="video"
54
55 # graphics
56 KERNEL=="agpgart", GROUP="video"
57 KERNEL=="pmu", GROUP="video"
58 KERNEL=="nvidia*|nvidiactl*", GROUP="video"
59 SUBSYSTEM=="graphics", GROUP="video"
60 SUBSYSTEM=="drm", GROUP="video"
61
62 # sound
63 SUBSYSTEM=="sound", GROUP="audio"
64 KERNEL=="mixer0", SYMLINK+="mixer"
65
66 # DVB (video)
67 SUBSYSTEM=="dvb", GROUP="video"
68
69 # FireWire (firewire-core driver: IIDC devices, AV/C devices)
70 SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video"
71 SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video"
72 SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
73 SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
74
75 # libusb device nodes
76 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
77
78 # printer
79 KERNEL=="parport[0-9]*", GROUP="lp"
80 SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
81 SUBSYSTEM=="ppdev", GROUP="lp"
82 SUBSYSTEM=="usb", KERNEL=="lp*", SYMLINK+="usb%k", GROUP="lp"
83 KERNEL=="lp[0-9]*", GROUP="lp"
84 KERNEL=="irlpt[0-9]*", GROUP="lp"
85 # hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
86 # the ones from the old usblp kernel module
87 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
88 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701*:", GROUP="lp", MODE="0664"
89
90 # block
91 SUBSYSTEM=="block", GROUP="disk"
92
93 # floppy
94 SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
95
96 # cdrom
97 SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
98 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
99 KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
100 KERNEL=="pktcdvd", GROUP="cdrom"
101
102 # tape
103 KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
104 KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
105 SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
106
107 # block-related
108 KERNEL=="sch[0-9]*", GROUP="disk"
109 SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
110 KERNEL=="pg[0-9]*", GROUP="disk"
111 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
112 KERNEL=="rawctl", GROUP="disk"
113 SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk"
114 SUBSYSTEM=="aoe", GROUP="disk", MODE="0220"
115 SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
116
117 # network
118 KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
119 KERNEL=="rfkill", MODE="0644"
120
121 # CPU
122 KERNEL=="cpu[0-9]*", MODE="0444"
123
124 KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" \
125 RUN+="/bin/mount -t fusectl fusectl /sys/fs/fuse/connections"
126
127 SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
128 KERNEL=="mmtimer", MODE="0644"
129 KERNEL=="rflash[0-9]*", MODE="0400"
130 KERNEL=="rrom[0-9]*", MODE="0400"