3
0

mdev_fat.conf 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #
  2. # This is a sample mdev.conf
  3. #
  4. # Provide user, group, and mode information for devices. If a regex matches
  5. # the device name provided by sysfs, use the appropriate user:group and mode
  6. # instead of the default 0:0 660.
  7. #
  8. # Syntax:
  9. # [-]devicename_regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
  10. # [-]$ENVVAR=regex user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
  11. # [-]@maj,min[-min2] user:group mode [=path]|[>path]|[!] [@|$|*cmd args...]
  12. #
  13. # [-]: do not stop on this match, continue reading mdev.conf
  14. # =: move, >: move and create a symlink
  15. # !: do not create device node
  16. # @|$|*: run cmd if $ACTION=remove, @cmd if $ACTION=add, *cmd in all cases
  17. # support module loading on hotplug
  18. $MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
  19. # null may already exist; therefore ownership has to be changed with command
  20. null root:root 666 @chmod 666 $MDEV
  21. zero root:root 666
  22. full root:root 666
  23. random root:root 444
  24. urandom root:root 444
  25. hwrandom root:root 444
  26. grsec root:root 660
  27. kmem root:root 640
  28. mem root:root 640
  29. port root:root 640
  30. # console may already exist; therefore ownership has to be changed with command
  31. console root:tty 600 @chmod 600 $MDEV
  32. ptmx root:tty 666
  33. pty.* root:tty 660
  34. # Typical devices
  35. tty root:tty 666
  36. tty[0-9]* root:tty 660
  37. vcsa*[0-9]* root:tty 660
  38. ttyS[0-9]* root:uucp 660
  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. # net devices
  48. tun[0-9]* root:root 600 =net/
  49. tap[0-9]* root:root 600 =net/
  50. # alsa sound devices and audio stuff
  51. pcm.* root:audio 660 =snd/
  52. control.* root:audio 660 =snd/
  53. midi.* root:audio 660 =snd/
  54. seq root:audio 660 =snd/
  55. timer root:audio 660 =snd/
  56. adsp root:audio 660 >sound/
  57. audio root:audio 660 >sound/
  58. dsp root:audio 660 >sound/
  59. mixer root:audio 660 >sound/
  60. sequencer.* root:audio 660 >sound/
  61. # Less typical devices
  62. # raid controllers
  63. cciss!(.*) root:disk 660 =cciss/%1
  64. ida!(.*) root:disk 660 =ida/%1
  65. rd!(.*) root:disk 660 =rd/%1
  66. ttyLTM[0-9] root:dialout 660 @ln -sf $MDEV modem
  67. ttySHSF[0-9] root:dialout 660 @ln -sf $MDEV modem
  68. slamr root:dialout 660 @ln -sf $MDEV slamr0
  69. slusb root:dialout 660 @ln -sf $MDEV slusb0
  70. fuse root:root 666
  71. # dri device
  72. card[0-9] root:video 660 =dri/
  73. # misc stuff
  74. agpgart root:root 660 >misc/
  75. psaux root:root 660 >misc/
  76. rtc root:root 664 >misc/
  77. # input stuff
  78. event[0-9]+ root:root 640 =input/
  79. mice root:root 640 =input/
  80. mouse[0-9] root:root 640 =input/
  81. ts[0-9] root:root 600 =input/
  82. # v4l stuff
  83. vbi[0-9] root:video 660 >v4l/
  84. video[0-9] root:video 660 >v4l/
  85. # dvb stuff
  86. dvb.* root:video 660 */lib/mdev/dvbdev
  87. # load drivers for usb devices
  88. usbdev[0-9].[0-9] root:root 660 */lib/mdev/usbdev
  89. usbdev[0-9].[0-9]_.* root:root 660
  90. # zaptel devices
  91. zap(.*) root:dialout 660 =zap/%1
  92. dahdi!(.*) root:dialout 660 =dahdi/%1