[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
|
---|
[95756c0] | 21 | KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule"
|
---|
| 22 | KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule"
|
---|
| 23 | KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule"
|
---|
| 24 | KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule"
|
---|
| 25 | KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule"
|
---|
| 26 | KERNEL=="console", MODE="0600", OPTIONS="last_rule"
|
---|
[7e161ea] | 27 |
|
---|
| 28 | # serial devices
|
---|
[90d6419] | 29 | KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
|
---|
| 30 | KERNEL=="mwave", NAME="modems/%k", GROUP="uucp"
|
---|
| 31 | KERNEL=="hvc*|hvsi*", GROUP="uucp"
|
---|
| 32 | KERNEL=="iseries/vtty*", GROUP="uucp"
|
---|
| 33 | KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
|
---|
| 34 | KERNEL=="ttyUSB*", ATTRS{product}=="[Hh]andspring*Treo*|[Hh]andspring*Visor*", SYMLINK+="pilot"
|
---|
[7e161ea] | 35 |
|
---|
| 36 | # video/graphics
|
---|
| 37 | SUBSYSTEM=="video4linux", GROUP="video"
|
---|
| 38 | SUBSYSTEM=="graphics" GROUP="video"
|
---|
[90d6419] | 39 | KERNEL=="vtx*|vbi*", GROUP="video"
|
---|
[858a93d] | 40 | KERNEL=="winradio*", GROUP="video"
|
---|
| 41 | KERNEL=="vttuner*", GROUP="video"
|
---|
[90d6419] | 42 | KERNEL=="nvidia*|nvidiactl*", GROUP="video"
|
---|
[7e161ea] | 43 | KERNEL=="video0", SYMLINK+="video"
|
---|
| 44 | KERNEL=="radio0", SYMLINK+="radio"
|
---|
| 45 | KERNEL=="vbi0", SYMLINK+="vbi"
|
---|
| 46 | KERNEL=="pmu", GROUP="video"
|
---|
| 47 |
|
---|
| 48 | # dvb
|
---|
[f59ed2c] | 49 | SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
|
---|
[7e161ea] | 50 |
|
---|
| 51 | # input devices
|
---|
[95756c0] | 52 | KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640"
|
---|
[7e161ea] | 53 | KERNEL=="js*", NAME="input/%k", MODE="0644"
|
---|
[95756c0] | 54 | KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600"
|
---|
[858a93d] | 55 | KERNEL=="lirc0", SYMLINK+="lirc"
|
---|
[7e161ea] | 56 |
|
---|
| 57 | # printer
|
---|
| 58 | SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
|
---|
| 59 | SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
|
---|
[858a93d] | 60 | KERNEL=="irlpt*", GROUP="lp"
|
---|
[7e161ea] | 61 |
|
---|
| 62 | # cpu devices
|
---|
| 63 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
|
---|
| 64 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
|
---|
| 65 | KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
|
---|
| 66 |
|
---|
| 67 | # IEEE1394 devices
|
---|
[858a93d] | 68 | KERNEL=="raw1394*", GROUP="video"
|
---|
| 69 | KERNEL=="dv1394*", SYMLINK+="dv1394/%n", GROUP="video"
|
---|
| 70 | KERNEL=="video1394*", SYMLINK+="video1394/%n", GROUP="video"
|
---|
[7e161ea] | 71 |
|
---|
| 72 | # 183 = /dev/hwrng Generic random number generator
|
---|
| 73 | KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
|
---|
[1f7827a2] | 74 |
|
---|
[7e161ea] | 75 | # 219 /dev/modems/mwave MWave modem firmware upload
|
---|
| 76 | KERNEL=="mwave", NAME="modems/%k"
|
---|
[1f7827a2] | 77 |
|
---|
[7e161ea] | 78 | # 169 /dev/specialix_rioctl Specialix RIO serial control
|
---|
| 79 | KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
|
---|
[1f7827a2] | 80 |
|
---|
[7e161ea] | 81 | # 167 /dev/specialix_sxctl Specialix serial control
|
---|
| 82 | KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
|
---|
| 83 |
|
---|
[a6cd72e] | 84 | # network
|
---|
[1f7827a2] | 85 | KERNEL=="tun", NAME="net/%k", MODE="0600"
|
---|
[a6cd72e] | 86 |
|
---|
[7e161ea] | 87 | # misc devices
|
---|
[95756c0] | 88 | KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
|
---|
| 89 | KERNEL=="nvram", GROUP="kmem", MODE="0600"
|
---|
| 90 | KERNEL=="null|zero|random", MODE="0666"
|
---|
| 91 | KERNEL=="full", MODE="0622"
|
---|
| 92 | KERNEL=="urandom", MODE="0644"
|
---|
| 93 | KERNEL=="rtc", MODE="0600"
|
---|
| 94 | KERNEL=="fuse", MODE="0666"
|
---|
| 95 | KERNEL=="sonypi", MODE="0666"
|
---|
| 96 | KERNEL=="agpgart", MODE="0600", GROUP="video"
|
---|
| 97 | KERNEL=="djs*", MODE="0644"
|
---|
| 98 | KERNEL=="sgi_*", MODE="0666"
|
---|
| 99 | KERNEL=="rrom*", MODE="0400"
|
---|
| 100 | KERNEL=="rflash*", MODE="0400"
|
---|
| 101 | KERNEL=="usbscanner*", MODE="0644"
|
---|
| 102 | KERNEL=="3270/ttycons*", MODE="0600"
|
---|
| 103 | KERNEL=="3270/tub*", MODE="0666"
|
---|
| 104 | KERNEL=="3270/tubcons*", MODE="0600"
|
---|
| 105 | KERNEL=="ica", MODE="0666"
|
---|
| 106 | KERNEL=="z90crypt", MODE="0666"
|
---|
| 107 | KERNEL=="mmtimer", MODE="0644"
|
---|
| 108 | KERNEL=="auer[0-9]*", NAME="usb/%k"
|
---|
[7e161ea] | 109 |
|
---|
[a6cd72e] | 110 | # packet writing interface
|
---|
[7e161ea] | 111 | KERNEL=="pktcdvd", NAME="pktcdvd/control"
|
---|
| 112 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
|
---|
| 113 |
|
---|
| 114 | # fix floppy devices
|
---|
[5b4b253] | 115 | KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
|
---|
| 116 | KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k"
|
---|
[7e161ea] | 117 |
|
---|
| 118 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
|
---|
| 119 | # sr: 4 TYPE_WORM, 5 TYPE_ROM
|
---|
| 120 | # st/osst: 1 TYPE_TAPE
|
---|
[910b1f6] | 121 | ACTION=="add", SUBSYSTEM=="scsi" , ATTR{type}=="0|7|14", ATTR{timeout}="60"
|
---|
| 122 | ACTION=="add", SUBSYSTEM=="scsi" , ATTR{type}=="1", ATTR{timeout}="900"
|
---|
[7e161ea] | 123 |
|
---|
| 124 | # misc storage devices (non-block)
|
---|
[95756c0] | 125 | KERNEL=="sg*", GROUP="disk", MODE="0640"
|
---|
| 126 | KERNEL=="sr*", GROUP="cdrom", MODE="0660"
|
---|
[858a93d] | 127 | KERNEL=="st*", GROUP="tape"
|
---|
| 128 | KERNEL=="nst*", GROUP="tape"
|
---|
| 129 | KERNEL=="initrd", GROUP="disk"
|
---|
| 130 | KERNEL=="qft*", GROUP="tape"
|
---|
| 131 | KERNEL=="nqft*", GROUP="tape"
|
---|
| 132 | KERNEL=="zqft*", GROUP="tape"
|
---|
| 133 | KERNEL=="nzqft*", GROUP="tape"
|
---|
| 134 | KERNEL=="rawqft*", GROUP="tape"
|
---|
| 135 | KERNEL=="nrawqft*", GROUP="tape"
|
---|
| 136 | KERNEL=="pf*", GROUP="disk"
|
---|
| 137 | KERNEL=="sch*", GROUP="disk"
|
---|
| 138 | KERNEL=="pt*", GROUP="tape"
|
---|
| 139 | KERNEL=="npt*", GROUP="tape"
|
---|
| 140 | KERNEL=="pg*", GROUP="disk"
|
---|
| 141 | KERNEL=="evms/block_device*", GROUP="disk"
|
---|
| 142 | KERNEL=="rawctl*", GROUP="disk"
|
---|
[5b4b253] | 143 | SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
|
---|
[90d6419] | 144 | KERNEL=="osst*|nosst*", GROUP="tape"
|
---|
[858a93d] | 145 | KERNEL=="iseries/vt*", GROUP="disk"
|
---|
| 146 | KERNEL=="iseries/nvt*", GROUP="disk"
|
---|
| 147 | KERNEL=="iseries/ibmsis*", GROUP="disk"
|
---|
[7e161ea] | 148 |
|
---|
| 149 | # libusb device access
|
---|
[95756c0] | 150 | SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
|
---|
| 151 | SUBSYSTEM=="usb_device", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
|
---|