[7e161ea] | 1 | ########################################################################
|
---|
| 2 | #
|
---|
[1f7827a2] | 3 | # Description : 50-udev.rules
|
---|
[7e161ea] | 4 | #
|
---|
| 5 | # Authors : Based on Open Suse Udev Rules
|
---|
| 6 | # kay.sievers@suse.de
|
---|
| 7 | #
|
---|
| 8 | # Adapted to : Jim Gifford
|
---|
[1f7827a2] | 9 | # LFS : Alexander E. Patrakov
|
---|
[7e161ea] | 10 | #
|
---|
| 11 | # Version : 00.01
|
---|
| 12 | #
|
---|
| 13 | # Notes :
|
---|
| 14 | #
|
---|
| 15 | ########################################################################
|
---|
| 16 |
|
---|
[5e2628a1] | 17 | # block devices
|
---|
| 18 | SUBSYSTEM=="block", GROUP="disk", MODE="0640"
|
---|
| 19 |
|
---|
[7e161ea] | 20 | # console
|
---|
[1f7827a2] | 21 | KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 22 | KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 23 | KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 24 | KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 25 | KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 26 | KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
|
---|
| 27 | KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
[7e161ea] | 28 |
|
---|
| 29 | # serial devices
|
---|
| 30 | KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
|
---|
| 31 | KERNEL=="pppox*", NAME="%k", GROUP="uucp"
|
---|
| 32 | KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
|
---|
| 33 | KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
|
---|
| 34 | KERNEL=="hvc*", NAME="%k", GROUP="uucp"
|
---|
| 35 | KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
|
---|
| 36 | KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
|
---|
[1f7827a2] | 37 | KERNEL=="ttyUSB*", SYSFS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
|
---|
[7e161ea] | 38 |
|
---|
| 39 | # video/graphics
|
---|
| 40 | SUBSYSTEM=="video4linux", GROUP="video"
|
---|
| 41 | SUBSYSTEM=="graphics" GROUP="video"
|
---|
| 42 | KERNEL=="vtx*", NAME="%k", GROUP="video"
|
---|
| 43 | KERNEL=="vbi*", NAME="%k", GROUP="video"
|
---|
| 44 | KERNEL=="winradio*", NAME="%k", GROUP="video"
|
---|
| 45 | KERNEL=="vttuner*", NAME="%k", GROUP="video"
|
---|
| 46 | KERNEL=="nvidia*", NAME="%k", GROUP="video"
|
---|
| 47 | KERNEL=="video0", SYMLINK+="video"
|
---|
| 48 | KERNEL=="radio0", SYMLINK+="radio"
|
---|
| 49 | KERNEL=="vbi0", SYMLINK+="vbi"
|
---|
| 50 | KERNEL=="pmu", GROUP="video"
|
---|
| 51 |
|
---|
| 52 | # dvb
|
---|
[f59ed2c] | 53 | SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
|
---|
[7e161ea] | 54 |
|
---|
| 55 | # input devices
|
---|
| 56 | KERNEL=="mice", NAME="input/%k", MODE="0640"
|
---|
| 57 | KERNEL=="mouse*", NAME="input/%k", MODE="0640"
|
---|
| 58 | KERNEL=="event*", NAME="input/%k", MODE="0640"
|
---|
| 59 | KERNEL=="js*", NAME="input/%k", MODE="0644"
|
---|
| 60 | KERNEL=="ts*", NAME="input/%k", MODE="0600"
|
---|
| 61 | KERNEL=="uinput", NAME="input/%k", MODE="0600"
|
---|
| 62 | KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
|
---|
| 63 |
|
---|
| 64 | # printer
|
---|
| 65 | SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
|
---|
| 66 | SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
|
---|
| 67 | KERNEL=="irlpt*", NAME="%k", GROUP="lp"
|
---|
| 68 |
|
---|
| 69 | # cpu devices
|
---|
| 70 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
|
---|
| 71 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
|
---|
| 72 | KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
|
---|
| 73 |
|
---|
| 74 | # IEEE1394 devices
|
---|
| 75 | KERNEL=="raw1394*", NAME="%k", GROUP="video"
|
---|
| 76 | KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
|
---|
| 77 | KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
|
---|
| 78 |
|
---|
| 79 | # 183 = /dev/hwrng Generic random number generator
|
---|
| 80 | KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
|
---|
[1f7827a2] | 81 |
|
---|
[7e161ea] | 82 | # 219 /dev/modems/mwave MWave modem firmware upload
|
---|
| 83 | KERNEL=="mwave", NAME="modems/%k"
|
---|
[1f7827a2] | 84 |
|
---|
[7e161ea] | 85 | # 169 /dev/specialix_rioctl Specialix RIO serial control
|
---|
| 86 | KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
|
---|
[1f7827a2] | 87 |
|
---|
[7e161ea] | 88 | # 167 /dev/specialix_sxctl Specialix serial control
|
---|
| 89 | KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
|
---|
| 90 |
|
---|
[a6cd72e] | 91 | # network
|
---|
[1f7827a2] | 92 | KERNEL=="tun", NAME="net/%k", MODE="0600"
|
---|
[a6cd72e] | 93 |
|
---|
[7e161ea] | 94 | # misc devices
|
---|
| 95 | KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 96 | KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 97 | KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 98 | KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
|
---|
| 99 | KERNEL=="null", NAME="%k", MODE="666"
|
---|
| 100 | KERNEL=="zero", NAME="%k", MODE="666"
|
---|
| 101 | KERNEL=="full", NAME="%k", MODE="622"
|
---|
| 102 | KERNEL=="random", NAME="%k", MODE="666"
|
---|
| 103 | KERNEL=="urandom", NAME="%k", MODE="644"
|
---|
| 104 | KERNEL=="rtc", GROUP="audio"
|
---|
| 105 | KERNEL=="sonypi", MODE="0666"
|
---|
| 106 | KERNEL=="agpgart", MODE="0600", GROUP="video"
|
---|
| 107 | KERNEL=="djs*", NAME="%k", MODE="644"
|
---|
| 108 | KERNEL=="sgi_*", NAME="%k", MODE="666"
|
---|
| 109 | KERNEL=="rrom*", NAME="%k", MODE="400"
|
---|
| 110 | KERNEL=="rflash*", NAME="%k", MODE="400"
|
---|
| 111 | KERNEL=="usbscanner*", NAME="%k", MODE="644"
|
---|
| 112 | KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
|
---|
| 113 | KERNEL=="3270/tub*", NAME="%k", MODE="666"
|
---|
| 114 | KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
|
---|
| 115 | KERNEL=="ica", NAME="%k", MODE="666"
|
---|
| 116 | KERNEL=="z90crypt", NAME="%k", MODE="666"
|
---|
| 117 | KERNEL=="mmtimer", NAME="%k", MODE="444"
|
---|
| 118 | KERNEL=="auer[0-9]*" NAME="usb/%k"
|
---|
| 119 |
|
---|
[a6cd72e] | 120 | # packet writing interface
|
---|
[7e161ea] | 121 | KERNEL=="pktcdvd", NAME="pktcdvd/control"
|
---|
| 122 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
|
---|
| 123 |
|
---|
| 124 | # fix floppy devices
|
---|
[529837f] | 125 | KERNEL=="fd[0-9]*", ACTION=="add", GROUP="floppy", MODE="660"
|
---|
[1f7827a2] | 126 | KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
|
---|
[7e161ea] | 127 |
|
---|
| 128 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
|
---|
| 129 | # sr: 4 TYPE_WORM, 5 TYPE_ROM
|
---|
| 130 | # st/osst: 1 TYPE_TAPE
|
---|
[1f7827a2] | 131 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
|
---|
| 132 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
|
---|
[7e161ea] | 133 |
|
---|
| 134 | # device mapper
|
---|
[1f7827a2] | 135 | KERNEL=="device-mapper", NAME="%k", SYMLINK+="mapper/control"
|
---|
[7e161ea] | 136 |
|
---|
| 137 | # misc storage devices (non-block)
|
---|
| 138 | KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
|
---|
[1f7827a2] | 139 | KERNEL=="st*", NAME="%k", GROUP="tape"
|
---|
| 140 | KERNEL=="nst*", NAME="%k", GROUP="tape"
|
---|
[7e161ea] | 141 | KERNEL=="initrd", NAME="%k", GROUP="disk"
|
---|
[1f7827a2] | 142 | KERNEL=="qft*", NAME="%k", GROUP="tape"
|
---|
| 143 | KERNEL=="nqft*", NAME="%k", GROUP="tape"
|
---|
| 144 | KERNEL=="zqft*", NAME="%k", GROUP="tape"
|
---|
| 145 | KERNEL=="nzqft*", NAME="%k", GROUP="tape"
|
---|
| 146 | KERNEL=="rawqft*", NAME="%k", GROUP="tape"
|
---|
| 147 | KERNEL=="nrawqft*", NAME="%k", GROUP="tape"
|
---|
[7e161ea] | 148 | KERNEL=="pf*", NAME="%k", GROUP="disk"
|
---|
| 149 | KERNEL=="sch*", NAME="%k", GROUP="disk"
|
---|
[1f7827a2] | 150 | KERNEL=="pt*", NAME="%k", GROUP="tape"
|
---|
| 151 | KERNEL=="npt*", NAME="%k", GROUP="tape"
|
---|
[7e161ea] | 152 | KERNEL=="pg*", NAME="%k", GROUP="disk"
|
---|
| 153 | KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
|
---|
| 154 | KERNEL=="rawctl*", NAME="%k", GROUP="disk"
|
---|
[1f7827a2] | 155 | KERNEL=="osst*", NAME="%k", GROUP="tape"
|
---|
| 156 | KERNEL=="nosst*", NAME="%k", GROUP="tape"
|
---|
[7e161ea] | 157 | KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
|
---|
| 158 | KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
|
---|
| 159 | KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
|
---|
| 160 |
|
---|
| 161 | # libusb device access
|
---|
[1f7827a2] | 162 | SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
|
---|
[c2504ea] | 163 |
|
---|
| 164 | # cdrom
|
---|
| 165 | KERNEL=="sr[0-9]*", GROUP="cdrom", SYMLINK+="cdrom%e"
|
---|
| 166 | KERNEL=="scd[0-9]*", GROUP="cdrom", SYMLINK+="cdrom%e"
|
---|
| 167 | KERNEL=="pcd[0-9]*", GROUP="cdrom", SYMLINK+="cdrom%e"
|
---|
| 168 |
|
---|