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