devfsd.conf 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # Sample /etc/devfsd.conf configuration file.
  2. # Richard Gooch <rgooch@atnf.csiro.au> 17-FEB-2002
  3. #
  4. # adapted for busybox devfsd implementation by Tito <farmatito@tiscali.it>
  5. #
  6. # Enable full compatibility mode for old device names. You may comment these
  7. # out if you don't use the old device names. Make sure you know what you're
  8. # doing!
  9. REGISTER .* MKOLDCOMPAT
  10. UNREGISTER .* RMOLDCOMPAT
  11. # You may comment out the above and uncomment the following if you've
  12. # configured your system to use the original "new" devfs names or the really
  13. # new names
  14. #REGISTER ^vc/ MKOLDCOMPAT
  15. #UNREGISTER ^vc/ RMOLDCOMPAT
  16. #REGISTER ^pty/ MKOLDCOMPAT
  17. #UNREGISTER ^pty/ RMOLDCOMPAT
  18. #REGISTER ^misc/ MKOLDCOMPAT
  19. #UNREGISTER ^misc/ RMOLDCOMPAT
  20. # You may comment these out if you don't use the original "new" names
  21. REGISTER .* MKNEWCOMPAT
  22. UNREGISTER .* RMNEWCOMPAT
  23. # Enable module autoloading. You may comment this out if you don't use
  24. # autoloading
  25. # Supported by busybox when CONFIG_DEVFSD_MODLOAD is set.
  26. # This actually doesn't work with busybox modutils but needs
  27. # the real modutils' modprobe
  28. LOOKUP .* MODLOAD
  29. # Uncomment the following if you want to set the group to "tty" for the
  30. # pseudo-tty devices. This is necessary so that mesg(1) can later be used to
  31. # enable/disable talk requests and wall(1) messages.
  32. REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
  33. #REGISTER ^pts/.* PERMISSIONS -1.tty 0600
  34. # Restoring /dev/log on startup would trigger the minilogd/initlog deadlock
  35. # (minilogd falsely assuming syslogd has been started).
  36. REGISTER ^log$ IGNORE
  37. CREATE ^log$ IGNORE
  38. CHANGE ^log$ IGNORE
  39. DELETE ^log$ IGNORE
  40. #
  41. # Uncomment this if you want permissions to be saved and restored
  42. # Do not do this for pseudo-terminal devices
  43. REGISTER ^pt[sy] IGNORE
  44. CREATE ^pt[sy] IGNORE
  45. CHANGE ^pt[sy] IGNORE
  46. DELETE ^pt[sy] IGNORE
  47. REGISTER .* COPY /lib/dev-state/$devname $devpath
  48. CREATE .* COPY $devpath /lib/dev-state/$devname
  49. CHANGE .* COPY $devpath /lib/dev-state/$devname
  50. #DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
  51. # Busybox
  52. DELETE .* EXECUTE /bin/rm -f /lib/dev-state/$devname
  53. RESTORE /lib/dev-state
  54. #
  55. # Uncomment this if you want the old /dev/cdrom symlink
  56. #REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
  57. #UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
  58. # busybox
  59. REGISTER ^cdroms/cdrom0$ EXECUTE /bin/ln -sf $devname cdrom
  60. UNREGISTER ^cdroms/cdrom0$ EXECUTE /bin/rm -f cdrom
  61. #REGISTER ^v4l/video0$ CFUNCTION GLOBAL mksymlink v4l/video0 video
  62. #UNREGISTER ^v4l/video0$ CFUNCTION GLOBAL unlink video
  63. #REGISTER ^radio0$ CFUNCTION GLOBAL mksymlink radio0 radio
  64. #UNREGISTER ^radio0$ CFUNCTION GLOBAL unlink radio
  65. # Busybox
  66. REGISTER ^v4l/video0$ EXECUTE /bin/ln -sf v4l/video0 video
  67. UNREGISTER ^v4l/video0$ EXECUTE /bin/rm -f video
  68. REGISTER ^radio0$ EXECUTE /bin/ln -sf radio0 radio
  69. UNREGISTER ^radio0$ EXECUTE /bin/rm -f radio
  70. # ALSA stuff
  71. #LOOKUP snd MODLOAD ACTION snd
  72. # Uncomment this to let PAM manage devfs
  73. # Not supported by busybox
  74. #REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
  75. # Uncomment this to manage USB mouse
  76. # Not supported by busybox
  77. #REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
  78. #UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
  79. # Busybox
  80. #REGISTER ^input/mouse0$ EXECUTE /bin/ln -sf $devname usbmouse
  81. #UNREGISTER ^input/mouse0$ EXECUTE /bin/rm -f usbmouse
  82. # Not supported by busybox
  83. #REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
  84. #UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
  85. # Busybox
  86. REGISTER ^input/mice$ EXECUTE /bin/ln -sf $devname usbmouse
  87. UNREGISTER ^input/mice$ EXECUTE /bin/rm -f usbmouse
  88. # If you have removable media and want to force media revalidation when looking
  89. # up new or old compatibility names, uncomment the following lines
  90. # SCSI NEWCOMPAT /dev/sd/* names
  91. LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  92. # SCSI OLDCOMPAT /dev/sd?? names
  93. LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  94. # IDE NEWCOMPAT /dev/ide/hd/* names
  95. LOOKUP ^(ide/hd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  96. # IDE OLDCOMPAT /dev/hd?? names
  97. LOOKUP ^(hd[a-z])[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  98. # IDE-SCSI NEWCOMPAT /dev/sd/* names
  99. #LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  100. #SCSI OLDCOMPAT /dev/scd? names
  101. LOOKUP ^(scd+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
  102. REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
  103. # Not supported by busybox
  104. #REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL mksymlink /dev/$devname ost/\2\1
  105. #UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ CFUNCTION GLOBAL unlink ost/\2\1
  106. # Busybox
  107. REGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/ln -sf /dev/$devname ost/\2\1
  108. UNREGISTER ^dvb/card([0-9]+)/([^/0-9]*)[0-9]+$ EXECUTE /bin/rm -f ost/\2\1
  109. # Include package-generated files from /etc/devfs/conf.d
  110. # Supported by busybox
  111. # INCLUDE /etc/devfs/conf.d/
  112. INCLUDE /etc/devfs/busybox/
  113. # Busybox: just for testing
  114. #INCLUDE /etc/devfs/nothing/
  115. #INCLUDE /etc/devfs/nothing/nothing
  116. #OPTIONAL_INCLUDE /etc/devfs/nothing/
  117. #OPTIONAL_INCLUDE /etc/devfs/nothing/nothing