9ac333608837154d1fd3cdfc38f719e2ebc1fcce
[oweals/busybox.git] / examples / mdev_fat.conf
1 #
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
16 null            root:root 666 @chmod 666 $MDEV
17 zero            root:root 666
18 full            root:root 666
19 random          root:root 444
20 urandom         root:root 444
21 hwrandom        root:root 444
22 grsec           root:root 660
23
24 kmem            root:root 640
25 mem             root:root 640
26 port            root:root 640
27 # console may already exist; therefore ownership has to be changed with command
28 console         root:tty 600 @chmod 600 $MDEV
29 ptmx            root:tty 666
30 pty.*           root:tty 660
31
32 # Typical devices
33
34 tty             root:tty 666
35 tty[0-9]*       root:tty 660
36 vcsa*[0-9]*     root:tty 660
37 ttyS[0-9]*      root:uucp 660
38
39 # block devices
40 ram([0-9]*)     root:disk 660 >rd/%1
41 loop([0-9]+)    root:disk 660 >loop/%1
42 sd[a-z].*       root:disk 660 */lib/mdev/usbdisk_link
43 hd[a-z][0-9]*   root:disk 660 */lib/mdev/ide_links
44 md[0-9]*        root:disk 660
45 sr[0-9]*        root:cdrom 660 @ln -sf $MDEV cdrom
46 fd[0-9]*        root:floppy 660
47
48 # net devices
49 tun[0-9]*       root:root 600 =net/
50 tap[0-9]*       root:root 600 =net/
51
52 # alsa sound devices and audio stuff
53 pcm.*           root:audio 660 =snd/
54 control.*       root:audio 660 =snd/
55 midi.*          root:audio 660 =snd/
56 seq             root:audio 660 =snd/
57 timer           root:audio 660 =snd/
58
59 adsp            root:audio 660 >sound/
60 audio           root:audio 660 >sound/
61 dsp             root:audio 660 >sound/
62 mixer           root:audio 660 >sound/
63 sequencer.*     root:audio 660 >sound/
64
65 # Less typical devices
66
67 # raid controllers
68 cciss!(.*)      root:disk 660 =cciss/%1
69 ida!(.*)        root:disk 660 =ida/%1
70 rd!(.*)         root:disk 660 =rd/%1
71
72 ttyLTM[0-9]     root:dialout 660 @ln -sf $MDEV modem
73 ttySHSF[0-9]    root:dialout 660 @ln -sf $MDEV modem
74 slamr           root:dialout 660 @ln -sf $MDEV slamr0
75 slusb           root:dialout 660 @ln -sf $MDEV slusb0
76
77 fuse            root:root 666
78
79 # dri device
80 card[0-9]       root:video 660 =dri/
81
82 # misc stuff
83 agpgart         root:root 660 >misc/
84 psaux           root:root 660 >misc/
85 rtc             root:root 664 >misc/
86
87 # input stuff
88 event[0-9]+     root:root 640 =input/
89 mice            root:root 640 =input/
90 mouse[0-9]      root:root 640 =input/
91 ts[0-9]         root:root 600 =input/
92
93 # v4l stuff
94 vbi[0-9]        root:video 660 >v4l/
95 video[0-9]      root:video 660 >v4l/
96
97 # dvb stuff
98 dvb.*           root:video 660 */lib/mdev/dvbdev
99
100 # load drivers for usb devices
101 usbdev[0-9].[0-9]       root:root 660 */lib/mdev/usbdev
102 usbdev[0-9].[0-9]_.*    root:root 660
103
104 # zaptel devices
105 zap(.*)         root:dialout 660 =zap/%1
106 dahdi!(.*)      root:dialout 660 =dahdi/%1