--- trunk/busybox/mdev.conf 2010/10/21 19:49:32 1187 +++ trunk/busybox/mdev.conf 2010/12/10 22:49:20 1233 @@ -1,26 +1,91 @@ -null 0:0 0666 -zero 0:0 0666 - -urandom 0:0 0444 - -console 0:4 0600 - -kmem 0:3 0640 -mem 0:3 0640 -port 0:3 0640 - -ptmx 0:5 0666 -tun 0:0 0640 =net/ - -tty 0:4 0666 -pty[pqrstuvwxyzabcdef][0123456789abcdef] 0:4 0660 -tty[pqrstuvwxyzabcdef][0123456789abcdef] 0:4 0660 -tty[0-9] 0:4 0660 -tty[0-9][0-9] 0:4 0660 - -ttyS[0-9] 0:4 0660 -ttyUSB[0-9]* 0:4 0660 -lp[0-9]* 0:9 0660 - -sd[a-z][0-9]* 0:8 0660 -hd[a-z][0-9]* 0:8 0660 +# /etc/mdev.conf +# +# Provide user, group, and mode information for devices. If a regex matches +# the device name provided by sysfs, use the appropriate user:group and mode +# instead of the default 0:0 660. +# +# Syntax: +# [-]devicename_regex user:group mode [>|=path] [@|$|*cmd args...] +# +# =: move, >: move and create a symlink +# @|$|*: run $cmd on delete, @cmd on create, *cmd on both + + +# support module loading on hotplug +$MODALIAS=.* root:root 0660 @modprobe "$MODALIAS" + +# null may already exist; therefore ownership has to be changed with command +null root:root 0666 @chmod 0666 $MDEV +zero root:root 0666 + +random root:root 0666 +urandom root:root 0666 +hwrandom root:root 0444 + +# console may already exist; therefore ownership has to be changed with command +console root:tty 0600 @chmod 0600 $MDEV + +kmem root:kmem 0640 +mem root:kmem 0640 +port root:kmem 0640 + +ptmx root:tape 0666 +pty.* root:tty 0660 + +tty root:tty 0666 +tty[0-9]* root:tty 0660 +vcsa*[0-9]* root:tty 0660 + +ttyS[0-9] root:dialout 0660 +ttyUSB[0-9]* root:dialout 0660 +lp[0-9]* root:lp 0660 + +# block devices +ram([0-9]*) root:disk 0660 >rd/%1 +loop([0-9]+) root:disk 0660 >loop/%1 +sd[a-z].* root:disk 0660 */lib/mdev/usbdisk_link +hd[a-z][0-9]* root:disk 0660 */lib/mdev/ide_links +md[0-9]* root:disk 0660 +sr[0-9]* root:cdrom 0660 @ln -sf $MDEV cdrom +fd[0-9]* root:floppy 0660 + +# net devices +-net/.* root:root 0640 @nameif +tun root:root 0640 =net/ +tap root:root 0640 =net/ + +# sound devices +pcm.* root:audio 0660 =snd/ +control.* root:audio 0660 =snd/ +midi.* root:audio 0660 =snd/ +seq root:audio 0660 =snd/ +timer root:audio 0660 =snd/ + +adsp root:audio 0660 >sound/ +audio root:audio 0660 >sound/ +dso root:audio 0660 >sound/ +mixer root:audio 0660 >sound/ +sequencer.* root:audio 0660 >sound/ + +# video devices +agpgart root:root 0660 >misc/ +card[0-9] root:video 0660 =dri/ +vbi[0-9] root:video 0660 >v4l/ +video[0-9] root:video 0660 >v4l/ +dvb.* root:video 0660 */lib/mdev/dvbdev + +# input devices +psaux root:root 0660 >misc/ +event[0-9]+ root:root 0640 =input/ +mice root:root 0640 =input/ +mouse[0-9] root:root 0640 =input/ +ts[0-9] root:root 0640 =input/ + +# usb devices +usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev +usbdev[0-9].[0-9]_.* root:root 0660 + + +# other devices +fuse root:root 0660 +rtc root:root 0660 >misc/ \ No newline at end of file