blob: f15a1705f094b7b6529462f4e72309af6d9d210c [file] [log] [blame]
Denys Vlasenko6e8e6662009-11-07 04:00:03 +01001#
2# This is a sample mdev.conf
3#
4
5# Provide user, group, and mode information for devices. If a regex matches
6# the device name provided by sysfs, use the appropriate user:group and mode
7# instead of the default 0:0 660.
8#
9# Syntax:
10# devicename_regex user:group mode [>|=path] [@|$|*command args...]
11#
12# =: move, >: move and create a symlink
13# @|$|*: run $cmd on delete, @cmd on create, *cmd on both
14
15# null may already exist; therefore ownership has to be changed with command
16null root:root 666 @chmod 666 $MDEV
17zero root:root 666
18full root:root 666
19random root:root 666
20urandom root:root 444
21hwrandom root:root 660
22grsec root:root 660
23
24kmem root:root 640
25mem root:root 640
26port root:root 640
27# console may already exist; therefore ownership has to be changed with command
28console root:tty 600 @chmod 600 $MDEV
29ptmx root:tty 666
30pty.* root:tty 660
31
32# Typical devices
33
34tty root:tty 666
35tty[0-9]* root:tty 660
36vcsa*[0-9]* root:tty 660
37ttyS[0-9]* root:uucp 660
38
39# block devices
40ram([0-9]*) root:disk 660 >rd/%1
41loop([0-9]+) root:disk 660 >loop/%1
42sd[a-z].* root:disk 660 */lib/mdev/usbdisk_link
43hd[a-z][0-9]* root:disk 660 */lib/mdev/ide_links
44md[0-9]* root:disk 660
45sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
46fd[0-9]* root:floppy 660
47
48# net devices
49tun[0-9]* root:root 600 =net/
50tap[0-9]* root:root 600 =net/
51
52# alsa sound devices and audio stuff
53pcm.* root:audio 660 =snd/
54control.* root:audio 660 =snd/
55midi.* root:audio 660 =snd/
56seq root:audio 660 =snd/
57timer root:audio 660 =snd/
58
59adsp root:audio 660 >sound/
60audio root:audio 660 >sound/
61dsp root:audio 660 >sound/
62mixer root:audio 660 >sound/
63sequencer.* root:audio 660 >sound/
64
65# Less typical devices
66
67# raid controllers
68cciss!(.*) root:disk 660 =cciss/%1
69ida!(.*) root:disk 660 =ida/%1
70rd!(.*) root:disk 660 =rd/%1
71
72ttyLTM[0-9] root:dialout 660 @ln -sf $MDEV modem
73ttySHSF[0-9] root:dialout 660 @ln -sf $MDEV modem
74slamr root:dialout 660 @ln -sf $MDEV slamr0
75slusb root:dialout 660 @ln -sf $MDEV slusb0
76fuse root:root 666
77
78# dri device
79card[0-9] root:video 660 =dri/
80
81# misc stuff
82agpgart root:root 660 >misc/
83psaux root:root 660 >misc/
84rtc root:root 664 >misc/
85
86# input stuff
87event[0-9]+ root:root 640 =input/
88mice root:root 640 =input/
89mouse[0-9] root:root 640 =input/
90ts[0-9] root:root 600 =input/
91
92# v4l stuff
93vbi[0-9] root:video 660 >v4l/
94video[0-9] root:video 660 >v4l/
95
96# dvb stuff
97dvb.* root:video 660 */lib/mdev/dvbdev
98
99# load drivers for usb devices
100usbdev[0-9].[0-9] root:root 660 */lib/mdev/usbdev
101usbdev[0-9].[0-9]_.* root:root 660
102
103# zaptel devices
104zap(.*) root:dialout 660 =zap/%1
105dahdi!(.*) root:dialout 660 =dahdi/%1