mdev.conf (3006B)
1 # mdev.conf based on https://github.com/slashbeast/mdev-like-a-boss 2 # mdev-like-a-boss 3 4 # Syntax: 5 # [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] 6 # [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] 7 # [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...] 8 # 9 # [-]: do not stop on this match, continue reading mdev.conf 10 # =: move, >: move and create a symlink 11 # !: do not create device node 12 # @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases 13 14 # support module loading on hotplug 15 $MODALIAS=.* root:root 660 @modprobe -b "$MODALIAS" 16 17 # null may already exist; therefore ownership has to be changed with command 18 null root:root 666 @chmod 666 $MDEV 19 zero root:root 666 20 full root:root 666 21 random root:root 444 22 urandom root:root 444 23 hwrandom root:root 444 24 grsec root:root 660 25 26 # webcam 27 video[0-9] root:video 660 28 29 # Kernel-based Virtual Machine. 30 kvm root:kvm 660 31 32 # vhost-net, to be used with kvm. 33 vhost-net root:kvm 660 34 35 kmem root:root 640 36 mem root:root 640 37 port root:root 640 38 # console may already exist; therefore ownership has to be changed with command 39 console root:tty 600 @chmod 600 $MDEV 40 ptmx root:tty 666 41 pty.* root:tty 660 42 43 # Typical devices 44 tty root:tty 666 45 tty[0-9]* root:tty 660 46 vcsa*[0-9]* root:tty 660 47 ttyS[0-9]* root:dialout 660 48 49 # block devices 50 ram([0-9]*) root:disk 660 >rd/%1 51 loop([0-9]+) root:disk 660 >loop/%1 52 sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom 53 fd[0-9]* root:floppy 660 54 55 net/tun[0-9]* root:kvm 660 56 net/tap[0-9]* root:root 600 57 58 # alsa sound devices and audio stuff 59 pcm.* root:audio 0660 =snd/ 60 control.* root:audio 0660 =snd/ 61 midi.* root:audio 0660 =snd/ 62 seq root:audio 0660 =snd/ 63 timer root:audio 0660 =snd/ 64 65 adsp root:audio 660 >sound/ 66 audio root:audio 660 >sound/ 67 dsp root:audio 660 >sound/ 68 mixer root:audio 660 >sound/ 69 sequencer.* root:audio 660 >sound/ 70 snd/.* root:audio 660 71 72 # raid controllers 73 cciss!(.*) root:disk 660 =cciss/%1 74 ida!(.*) root:disk 660 =ida/%1 75 rd!(.*) root:disk 660 =rd/%1 76 77 fuse root:root 666 78 79 card[0-9] root:video 660 =dri/ 80 81 agpgart root:root 660 >misc/ 82 psaux root:root 660 >misc/ 83 rtc root:root 664 >misc/ 84 85 # input stuff 86 SUBSYSTEM=input;.* root:input 660 87 88 # v4l stuff 89 vbi[0-9] root:video 660 >v4l/ 90 video[0-9] root:video 660 >v4l/ 91 92 # dvb stuff 93 dvb.* root:video 660 94 95 # drm etc 96 dri/.* root:video 660 97 98 # Don't create old usbdev* devices. 99 usbdev[0-9].[0-9]* root:root 660 ! 100 101 # Stop creating x:x:x:x which looks like /dev/dm-* 102 [0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 ! 103 104 # /dev/cpu support. 105 microcode root:root 600 =cpu/ 106 cpu([0-9]+) root:root 600 =cpu/%1/cpuid 107 msr([0-9]+) root:root 600 =cpu/%1/msr 108 109 # libudev-zero hotplug. 110 SUBSYSTEM=drm;.* root:video 660 *libudev-zero-helper 111 SUBSYSTEM=input;.* root:input 660 *libudev-zero-helper