2 # This is a sample mdev.conf
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.
10 # [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
11 # [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
12 # [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
14 # [-]: do not stop on this match, continue reading mdev.conf
15 # =: move, >: move and create a symlink
16 # !: do not create device node
17 # @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
19 # support module loading on hotplug
20 $MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
22 # null may already exist; therefore ownership has to be changed with command
23 null root:root 666 @chmod 666 $MDEV
28 hwrandom root:root 444
34 # console may already exist; therefore ownership has to be changed with command
35 console root:tty 600 @chmod 600 $MDEV
42 tty[0-9]* root:tty 660
43 vcsa*[0-9]* root:tty 660
44 ttyS[0-9]* root:uucp 660
47 ram([0-9]*) root:disk 660 >rd/%1
48 loop([0-9]+) root:disk 660 >loop/%1
49 sd[a-z].* root:disk 660 */lib/mdev/usbdisk_link
50 hd[a-z][0-9]* root:disk 660 */lib/mdev/ide_links
51 md[0-9]* root:disk 660
52 sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
53 fd[0-9]* root:floppy 660
56 tun[0-9]* root:root 600 =net/
57 tap[0-9]* root:root 600 =net/
59 # alsa sound devices and audio stuff
60 pcm.* root:audio 660 =snd/
61 control.* root:audio 660 =snd/
62 midi.* root:audio 660 =snd/
63 seq root:audio 660 =snd/
64 timer root:audio 660 =snd/
66 adsp root:audio 660 >sound/
67 audio root:audio 660 >sound/
68 dsp root:audio 660 >sound/
69 mixer root:audio 660 >sound/
70 sequencer.* root:audio 660 >sound/
72 # Less typical devices
75 cciss!(.*) root:disk 660 =cciss/%1
76 ida!(.*) root:disk 660 =ida/%1
77 rd!(.*) root:disk 660 =rd/%1
79 ttyLTM[0-9] root:dialout 660 @ln -sf $MDEV modem
80 ttySHSF[0-9] root:dialout 660 @ln -sf $MDEV modem
81 slamr root:dialout 660 @ln -sf $MDEV slamr0
82 slusb root:dialout 660 @ln -sf $MDEV slusb0
87 card[0-9] root:video 660 =dri/
90 agpgart root:root 660 >misc/
91 psaux root:root 660 >misc/
92 rtc root:root 664 >misc/
95 event[0-9]+ root:root 640 =input/
96 mice root:root 640 =input/
97 mouse[0-9] root:root 640 =input/
98 ts[0-9] root:root 600 =input/
101 vbi[0-9] root:video 660 >v4l/
102 video[0-9] root:video 660 >v4l/
105 dvb.* root:video 660 */lib/mdev/dvbdev
107 # load drivers for usb devices
108 usbdev[0-9].[0-9] root:root 660 */lib/mdev/usbdev
109 usbdev[0-9].[0-9]_.* root:root 660
112 zap(.*) root:dialout 660 =zap/%1
113 dahdi!(.*) root:dialout 660 =dahdi/%1