[7e161ea] | 1 | ########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Description : Base Udev Rules Set
|
---|
| 4 | #
|
---|
| 5 | # Authors : Based on Open Suse Udev Rules
|
---|
| 6 | # kay.sievers@suse.de
|
---|
| 7 | #
|
---|
| 8 | # Adapted to : Jim Gifford
|
---|
| 9 | # LFS
|
---|
| 10 | #
|
---|
| 11 | # Version : 00.01
|
---|
| 12 | #
|
---|
| 13 | # Notes :
|
---|
| 14 | #
|
---|
| 15 | ########################################################################
|
---|
| 16 |
|
---|
[7467862] | 17 | # hotplug
|
---|
| 18 | ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
|
---|
| 19 |
|
---|
[7e161ea] | 20 | # console
|
---|
| 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=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 25 | KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 26 | KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 27 | KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
|
---|
| 28 | KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 29 |
|
---|
| 30 | # serial devices
|
---|
| 31 | KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
|
---|
| 32 | KERNEL=="pppox*", NAME="%k", GROUP="uucp"
|
---|
| 33 | KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
|
---|
| 34 | KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
|
---|
| 35 | KERNEL=="hvc*", NAME="%k", GROUP="uucp"
|
---|
| 36 | KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
|
---|
| 37 | KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
|
---|
[f59ed2c] | 38 | KERNEL=="ttyUSB*", SYSFS{product}=="[Pp]alm*Handheld*", SYMLINK+="pilot"
|
---|
[7e161ea] | 39 |
|
---|
| 40 | # video/graphics
|
---|
| 41 | SUBSYSTEM=="video4linux", GROUP="video"
|
---|
| 42 | SUBSYSTEM=="graphics" GROUP="video"
|
---|
| 43 | KERNEL=="vtx*", NAME="%k", GROUP="video"
|
---|
| 44 | KERNEL=="vbi*", NAME="%k", GROUP="video"
|
---|
| 45 | KERNEL=="winradio*", NAME="%k", GROUP="video"
|
---|
| 46 | KERNEL=="vttuner*", NAME="%k", GROUP="video"
|
---|
| 47 | KERNEL=="nvidia*", NAME="%k", GROUP="video"
|
---|
| 48 | KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
|
---|
| 49 | KERNEL=="video0", SYMLINK+="video"
|
---|
| 50 | KERNEL=="radio0", SYMLINK+="radio"
|
---|
| 51 | KERNEL=="vbi0", SYMLINK+="vbi"
|
---|
| 52 | KERNEL=="pmu", GROUP="video"
|
---|
| 53 |
|
---|
| 54 | # dvb
|
---|
[f59ed2c] | 55 | SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
|
---|
[7e161ea] | 56 |
|
---|
| 57 | # input devices
|
---|
| 58 | KERNEL=="mice", NAME="input/%k", MODE="0640"
|
---|
| 59 | KERNEL=="mouse*", NAME="input/%k", MODE="0640"
|
---|
| 60 | KERNEL=="event*", NAME="input/%k", MODE="0640"
|
---|
| 61 | KERNEL=="js*", NAME="input/%k", MODE="0644"
|
---|
| 62 | KERNEL=="ts*", NAME="input/%k", MODE="0600"
|
---|
| 63 | KERNEL=="uinput", NAME="input/%k", MODE="0600"
|
---|
| 64 | KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
|
---|
[a6cd72e] | 65 | KERNEL=="input[0-9]*", ACTION=="add", RUN+="input.sh"
|
---|
[7e161ea] | 66 |
|
---|
| 67 | # printer
|
---|
| 68 | SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
|
---|
| 69 | SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
|
---|
| 70 | KERNEL=="irlpt*", NAME="%k", GROUP="lp"
|
---|
| 71 |
|
---|
| 72 | # cpu devices
|
---|
| 73 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
|
---|
| 74 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
|
---|
| 75 | KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
|
---|
| 76 |
|
---|
| 77 | # IEEE1394 devices
|
---|
| 78 | KERNEL=="raw1394*", NAME="%k", GROUP="video"
|
---|
| 79 | KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
|
---|
| 80 | KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
|
---|
| 81 |
|
---|
| 82 | # 183 = /dev/hwrng Generic random number generator
|
---|
| 83 | KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
|
---|
| 84 | # 219 /dev/modems/mwave MWave modem firmware upload
|
---|
| 85 | KERNEL=="mwave", NAME="modems/%k"
|
---|
| 86 | # 169 /dev/specialix_rioctl Specialix RIO serial control
|
---|
| 87 | KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
|
---|
| 88 | # 167 /dev/specialix_sxctl Specialix serial control
|
---|
| 89 | KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
|
---|
| 90 |
|
---|
[a6cd72e] | 91 | # network
|
---|
| 92 | KERNEL=="tun", NAME="net/%k", MODE="0600"
|
---|
| 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
|
---|
[a6cd72e] | 125 | KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
|
---|
| 126 | KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
|
---|
| 127 | KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
|
---|
[7e161ea] | 128 |
|
---|
| 129 | # block devices
|
---|
| 130 | SUBSYSTEM=="block", GROUP="disk", MODE="0640"
|
---|
| 131 |
|
---|
| 132 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
|
---|
| 133 | # sr: 4 TYPE_WORM, 5 TYPE_ROM
|
---|
| 134 | # st/osst: 1 TYPE_TAPE
|
---|
| 135 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
|
---|
| 136 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
|
---|
| 137 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
|
---|
| 138 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
|
---|
| 139 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
|
---|
| 140 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
|
---|
| 141 | SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
|
---|
| 142 |
|
---|
[a6cd72e] | 143 | # load IDE modules
|
---|
| 144 | SUBSYSTEM=="ide", ACTION=="add", RUN+="ide.sh"
|
---|
[7e161ea] | 145 |
|
---|
| 146 | # device mapper
|
---|
[a6cd72e] | 147 | KERNEL=="device-mapper", NAME="%k", SYMLINK+="mapper/control"
|
---|
[7e161ea] | 148 |
|
---|
| 149 | # misc storage devices (non-block)
|
---|
| 150 | KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
|
---|
| 151 | KERNEL=="st*", NAME="%k", GROUP="disk"
|
---|
| 152 | KERNEL=="nst*", NAME="%k", GROUP="disk"
|
---|
| 153 | KERNEL=="initrd", NAME="%k", GROUP="disk"
|
---|
| 154 | KERNEL=="qft*", NAME="%k", GROUP="disk"
|
---|
| 155 | KERNEL=="nqft*", NAME="%k", GROUP="disk"
|
---|
| 156 | KERNEL=="zqft*", NAME="%k", GROUP="disk"
|
---|
| 157 | KERNEL=="nzqft*", NAME="%k", GROUP="disk"
|
---|
| 158 | KERNEL=="rawqft*", NAME="%k", GROUP="disk"
|
---|
| 159 | KERNEL=="nrawqft*", NAME="%k", GROUP="disk"
|
---|
| 160 | KERNEL=="pf*", NAME="%k", GROUP="disk"
|
---|
| 161 | KERNEL=="sch*", NAME="%k", GROUP="disk"
|
---|
| 162 | KERNEL=="pt*", NAME="%k", GROUP="disk"
|
---|
| 163 | KERNEL=="npt*", NAME="%k", GROUP="disk"
|
---|
| 164 | KERNEL=="pg*", NAME="%k", GROUP="disk"
|
---|
| 165 | KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
|
---|
| 166 | KERNEL=="rawctl*", NAME="%k", GROUP="disk"
|
---|
| 167 | KERNEL=="osst*", NAME="%k", GROUP="disk"
|
---|
| 168 | KERNEL=="nosst*", NAME="%k", GROUP="disk"
|
---|
| 169 | KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
|
---|
| 170 | KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
|
---|
| 171 | KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
|
---|
| 172 |
|
---|
| 173 | # libusb device access
|
---|
| 174 | SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
|
---|
| 175 |
|
---|
[a6cd72e] | 176 | # kernel firmware loader
|
---|
[103e3eb] | 177 | SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper"
|
---|