devfsd.conf 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # Sample /etc/devfsd.conf configuration file.
  2. # Richard Gooch <rgooch@atnf.csiro.au> 17-FEB-2002
  3. #
  4. # The Gentoo Linux Team - http://www.gentoo.org/
  5. # - Many fixes, etc
  6. #
  7. # Enable full compatibility mode for old device names. You may comment these
  8. # out if you don't use the old device names. Make sure you know what you're
  9. # doing!
  10. REGISTER .* MKOLDCOMPAT
  11. UNREGISTER .* RMOLDCOMPAT
  12. # You may comment out the above and uncomment the following if you've
  13. # configured your system to use the original "new" devfs names or the really
  14. # new names
  15. #REGISTER ^vc/.* MKOLDCOMPAT
  16. #UNREGISTER ^vc/.* RMOLDCOMPAT
  17. #REGISTER ^pty/.* MKOLDCOMPAT
  18. #UNREGISTER ^pty/.* RMOLDCOMPAT
  19. #REGISTER ^misc MKOLDCOMPAT
  20. #UNREGISTER ^misc RMOLDCOMPAT
  21. # You may comment these out if you don't use the original "new" names
  22. REGISTER .* MKNEWCOMPAT
  23. UNREGISTER .* RMNEWCOMPAT
  24. # Enable module autoloading. You may comment this out if you don't use
  25. # autoloading
  26. LOOKUP .* MODLOAD
  27. # Uncomment the following if you want to set the group to "tty" for the
  28. # pseudo-tty devices. This is necessary so that mesg(1) can later be used to
  29. # enable/disable talk requests and wall(1) messages.
  30. REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
  31. REGISTER ^pts/.* PERMISSIONS -1.tty 0600
  32. # Uncomment this if you want permissions to be saved and restored
  33. # NB: Do NOT change the following!
  34. # Do not do this for pseudo-terminal devices
  35. REGISTER ^pt[sy]/.* IGNORE
  36. CHANGE ^pt[sy]/.* IGNORE
  37. CREATE ^pt[sy]/.* IGNORE
  38. DELETE ^pt[sy] IGNORE
  39. REGISTER ^log IGNORE
  40. CHANGE ^log IGNORE
  41. CREATE ^log IGNORE
  42. DELETE ^log IGNORE
  43. REGISTER .* COPY /lib/dev-state/$devname $devpath
  44. CHANGE .* COPY $devpath /lib/dev-state/$devname
  45. CREATE .* COPY $devpath /lib/dev-state/$devname
  46. DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
  47. RESTORE /lib/dev-state
  48. # You can force default like this :
  49. # PERMISSIONS owner_and_group access_mode
  50. # ALSA/OSS stuff
  51. # Comment/change these if you want to change the permissions on
  52. # the audio devices
  53. LOOKUP snd MODLOAD ACTION snd
  54. LOOKUP dsp MODLOAD
  55. LOOKUP mixer MODLOAD
  56. LOOKUP midi MODLOAD
  57. REGISTER sound/.* PERMISSIONS root.audio 660
  58. REGISTER snd/.* PERMISSIONS root.audio 660
  59. # Uncomment this to let PAM manage devfs
  60. #REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
  61. # Autoload the sg module if generic scsi driver compiled as module.
  62. #LOOKUP ^sg$ MODLOAD ACTION sg
  63. # Give the cdrom group access to /dev/sg0
  64. REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrom 660
  65. # Give the cdrom group access to the cdrom devices
  66. REGISTER ^scsi/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
  67. REGISTER ^ide/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
  68. # Give the floppy group access to the floppy devices
  69. REGISTER ^floppy/.* PERMISSIONS root.floppy 660
  70. # Give the usb group access to the usb devices
  71. REGISTER ^usb/.* PERMISSIONS root.usb 660
  72. REGISTER ^tts/USB.* PERMISSIONS root.usb 660
  73. REGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL mksymlink $devname ttyUSB\1
  74. UNREGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL unlink ttyUSB\1
  75. # Video devices
  76. REGISTER ^v4l/.* PERMISSIONS root.video 660
  77. REGISTER ^dri/.* PERMISSIONS root.video 660
  78. REGISTER ^nvidia.* PERMISSIONS root.video 660
  79. # General note for the following auto creation of symlinks:
  80. #
  81. # If you change the device that the symlink points to,
  82. # you should also remove the symlink before restarting
  83. # devfsd
  84. # Create /dev/cdrom for the first cdrom drive
  85. LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
  86. REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
  87. UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
  88. # Create /dev/dvd for the second cdrom drive
  89. # (change 'cdroms/cdrom1' to suite your setup)
  90. # NOTE: We add the fully qualified path here, else some apps
  91. # have problems to resolve the true device (drip comes to mind)
  92. #LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
  93. #REGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL mksymlink ${devpath} dvd
  94. #UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd
  95. # Create /dev/cdrw for the first cdrom on the scsi bus
  96. # (change 'sr0' to suite your setup)
  97. #LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
  98. #REGISTER ^sr0$ CFUNCTION GLOBAL mksymlink $devname cdrw
  99. #UNREGISTER ^sr0$ CFUNCTION GLOBAL unlink cdrw
  100. # Create /dev/mouse
  101. LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux mouse
  102. REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname mouse
  103. UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
  104. # Manage USB mouse
  105. REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
  106. UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
  107. REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
  108. UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
  109. # Create compatibility link for broken misc/net/tun driver
  110. REGISTER ^misc/net/tun$ CFUNCTION GLOBAL unlink net/tun
  111. REGISTER ^misc/net/tun$ CFUNCTION GLOBAL symlink /dev/$devname net/tun
  112. # Support additional config installed by packages ...
  113. INCLUDE /etc/devfs.d
  114. # devfsd.conf ends here