55-lfs.rules 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # /etc/udev/rules.d/55-lfs.rules: Rule definitions for LFS.
  2. # Core kernel devices
  3. # override both of these
  4. KERNEL=="random", MODE="0444"
  5. KERNEL=="urandom", MODE="0444"
  6. KERNEL=="aio", MODE="0444"
  7. KERNEL=="kmsg", MODE="0600"
  8. KERNEL=="rtc", MODE="0666"
  9. # Comms devices
  10. KERNEL=="rfcomm[0-9]*", GROUP="uucp"
  11. KERNEL=="ippp[0-9]*", GROUP="uucp"
  12. KERNEL=="isdn[0-9]*", GROUP="uucp"
  13. KERNEL=="isdnctrl[0-9]*", GROUP="uucp"
  14. KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
  15. KERNEL=="capi?*", NAME="capi/%n", GROUP="uucp"
  16. KERNEL=="dcbri[0-9]*", GROUP="uucp"
  17. # ALSA devices go in their own subdirectory
  18. KERNEL=="controlC[0-9]*", GROUP="audio", NAME="snd/%k"
  19. KERNEL=="hwC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
  20. KERNEL=="pcmC[0-9]*D[0-9]*[cp]", GROUP="audio", NAME="snd/%k"
  21. KERNEL=="midiC[0-9]*D[0-9]*", GROUP="audio", NAME="snd/%k"
  22. KERNEL=="timer", GROUP="audio", NAME="snd/%k"
  23. KERNEL=="seq", GROUP="audio", NAME="snd/%k"
  24. # Sound devices
  25. KERNEL=="admmidi*", GROUP="audio"
  26. KERNEL=="adsp*", GROUP="audio"
  27. KERNEL=="aload*", GROUP="audio"
  28. KERNEL=="amidi*", GROUP="audio"
  29. KERNEL=="amixer*", GROUP="audio"
  30. KERNEL=="audio*", GROUP="audio"
  31. KERNEL=="dmfm*", GROUP="audio"
  32. KERNEL=="dmmidi*", GROUP="audio"
  33. KERNEL=="dsp*", GROUP="audio"
  34. KERNEL=="midi*", GROUP="audio"
  35. KERNEL=="mixer*", GROUP="audio"
  36. KERNEL=="music", GROUP="audio"
  37. KERNEL=="sequencer*", GROUP="audio"
  38. # Input devices
  39. # override MODE on these four
  40. KERNEL=="mice", MODE="0644", SYMLINK+="mouse"
  41. KERNEL=="mouse*", MODE="0644"
  42. KERNEL=="event*", MODE="0644"
  43. KERNEL=="ts*", MODE="0644"
  44. KERNEL=="psaux", MODE="0644"
  45. KERNEL=="js", MODE="0644"
  46. KERNEL=="djs", MODE="0644"
  47. # USB devices go in their own subdirectory
  48. KERNEL=="hiddev*", NAME="usb/%k"
  49. KERNEL=="legousbtower*", NAME="usb/%k"
  50. KERNEL=="dabusb*", NAME="usb/%k"
  51. SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
  52. # DRI devices are managed by the X server, so prevent udev from creating them
  53. KERNEL=="card*", OPTIONS+="ignore_device"
  54. # Video devices
  55. KERNEL=="fb[0-9]*", GROUP="video"
  56. KERNEL=="video[0-9]*", GROUP="video"
  57. KERNEL=="radio[0-9]*", GROUP="video"
  58. KERNEL=="vbi[0-9]*", GROUP="video"
  59. KERNEL=="vtx[0-9]*", GROUP="video"
  60. # DVB devices
  61. SUBSYSTEM=="dvb", GROUP="video"
  62. # Storage/memory devices
  63. # override: make group-writable
  64. SUBSYSTEM=="block", MODE="0660"
  65. # dmsetup and lvm2 related programs create devicemapper devices so we prevent
  66. # udev from creating them
  67. KERNEL=="dm-*", OPTIONS+="ignore_device"
  68. # Tape devices
  69. # override all these
  70. KERNEL=="ht[0-9]*", GROUP="tape"
  71. KERNEL=="nht[0-9]*", GROUP="tape"
  72. KERNEL=="pt[0-9]*", GROUP="tape"
  73. KERNEL=="npt[0-9]*", GROUP="tape"
  74. KERNEL=="st[0-9]*", GROUP="tape"
  75. KERNEL=="nst[0-9]*", GROUP="tape"
  76. # Override floppy devices
  77. KERNEL=="fd[0-9]", GROUP="floppy"
  78. KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k"