[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 |
|
---|
| 17 | # ignore these events until someone needs them
|
---|
| 18 | SUBSYSTEM=="drivers", OPTIONS="last_rule"
|
---|
| 19 | SUBSYSTEM=="module", OPTIONS="last_rule"
|
---|
| 20 |
|
---|
| 21 | # console
|
---|
| 22 | KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 23 | KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 24 | KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 25 | KERNEL=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 26 | KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 27 | KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 28 | KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
|
---|
| 29 | KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 30 |
|
---|
| 31 | # serial devices
|
---|
| 32 | KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
|
---|
| 33 | KERNEL=="pppox*", NAME="%k", GROUP="uucp"
|
---|
| 34 | KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
|
---|
| 35 | KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
|
---|
| 36 | KERNEL=="hvc*", NAME="%k", GROUP="uucp"
|
---|
| 37 | KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
|
---|
| 38 | KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
|
---|
| 39 | KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot"
|
---|
| 40 |
|
---|
| 41 | # video/graphics
|
---|
| 42 | SUBSYSTEM=="video4linux", GROUP="video"
|
---|
| 43 | SUBSYSTEM=="graphics" GROUP="video"
|
---|
| 44 | KERNEL=="vtx*", NAME="%k", GROUP="video"
|
---|
| 45 | KERNEL=="vbi*", NAME="%k", GROUP="video"
|
---|
| 46 | KERNEL=="winradio*", NAME="%k", GROUP="video"
|
---|
| 47 | KERNEL=="vttuner*", NAME="%k", GROUP="video"
|
---|
| 48 | KERNEL=="nvidia*", NAME="%k", GROUP="video"
|
---|
| 49 | KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
|
---|
| 50 | KERNEL=="video0", SYMLINK+="video"
|
---|
| 51 | KERNEL=="radio0", SYMLINK+="radio"
|
---|
| 52 | KERNEL=="vbi0", SYMLINK+="vbi"
|
---|
| 53 | KERNEL=="pmu", GROUP="video"
|
---|
| 54 |
|
---|
| 55 | # dvb
|
---|
| 56 | SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
|
---|
| 57 |
|
---|
| 58 | # Kino jogshuttle support
|
---|
| 59 | SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="b33/10/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
|
---|
| 60 | SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="5f3/240/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
|
---|
| 61 |
|
---|
| 62 | # input devices
|
---|
| 63 | KERNEL=="mice", NAME="input/%k", MODE="0640"
|
---|
| 64 | KERNEL=="mouse*", NAME="input/%k", MODE="0640"
|
---|
| 65 | KERNEL=="event*", NAME="input/%k", MODE="0640"
|
---|
| 66 | KERNEL=="js*", NAME="input/%k", MODE="0644"
|
---|
| 67 | KERNEL=="ts*", NAME="input/%k", MODE="0600"
|
---|
| 68 | KERNEL=="uinput", NAME="input/%k", MODE="0600"
|
---|
| 69 | KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
|
---|
| 70 | KERNEL=="input[0-9]*", RUN+="/lib/udev/input_device.sh"
|
---|
| 71 | KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"
|
---|
| 72 |
|
---|
| 73 | # printer
|
---|
| 74 | SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
|
---|
| 75 | SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
|
---|
| 76 | KERNEL=="irlpt*", NAME="%k", GROUP="lp"
|
---|
| 77 |
|
---|
| 78 | # cpu devices
|
---|
| 79 | KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
|
---|
| 80 | KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
|
---|
| 81 | KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
|
---|
| 82 |
|
---|
| 83 | # IEEE1394 devices
|
---|
| 84 | KERNEL=="raw1394*", NAME="%k", GROUP="video"
|
---|
| 85 | KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
|
---|
| 86 | KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
|
---|
| 87 |
|
---|
| 88 | # 183 = /dev/hwrng Generic random number generator
|
---|
| 89 | KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
|
---|
| 90 | # 219 /dev/modems/mwave MWave modem firmware upload
|
---|
| 91 | KERNEL=="mwave", NAME="modems/%k"
|
---|
| 92 | # 169 /dev/specialix_rioctl Specialix RIO serial control
|
---|
| 93 | KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
|
---|
| 94 | # 167 /dev/specialix_sxctl Specialix serial control
|
---|
| 95 | KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
|
---|
| 96 |
|
---|
| 97 | # misc devices
|
---|
| 98 | KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 99 | KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 100 | KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 101 | KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
|
---|
| 102 | KERNEL=="null", NAME="%k", MODE="666"
|
---|
| 103 | KERNEL=="zero", NAME="%k", MODE="666"
|
---|
| 104 | KERNEL=="full", NAME="%k", MODE="622"
|
---|
| 105 | KERNEL=="random", NAME="%k", MODE="666"
|
---|
| 106 | KERNEL=="urandom", NAME="%k", MODE="644"
|
---|
| 107 | KERNEL=="rtc", GROUP="audio"
|
---|
| 108 | KERNEL=="sonypi", MODE="0666"
|
---|
| 109 | KERNEL=="agpgart", MODE="0600", GROUP="video"
|
---|
| 110 | KERNEL=="djs*", NAME="%k", MODE="644"
|
---|
| 111 | KERNEL=="sgi_*", NAME="%k", MODE="666"
|
---|
| 112 | KERNEL=="rrom*", NAME="%k", MODE="400"
|
---|
| 113 | KERNEL=="rflash*", NAME="%k", MODE="400"
|
---|
| 114 | KERNEL=="usbscanner*", NAME="%k", MODE="644"
|
---|
| 115 | KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
|
---|
| 116 | KERNEL=="3270/tub*", NAME="%k", MODE="666"
|
---|
| 117 | KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
|
---|
| 118 | KERNEL=="ica", NAME="%k", MODE="666"
|
---|
| 119 | KERNEL=="z90crypt", NAME="%k", MODE="666"
|
---|
| 120 | KERNEL=="mmtimer", NAME="%k", MODE="444"
|
---|
| 121 | KERNEL=="auer[0-9]*" NAME="usb/%k"
|
---|
| 122 |
|
---|
| 123 | KERNEL=="pktcdvd", NAME="pktcdvd/control"
|
---|
| 124 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
|
---|
| 125 |
|
---|
| 126 | # fix floppy devices
|
---|
| 127 | KERNEL=="nvram", ACTION=="add", RUN+="/lib/udev/load_floppy_module.sh"
|
---|
| 128 | KERNEL=="fd*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="/lib/udev/create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
|
---|
| 129 | KERNEL=="fd*", ACTION=="remove", RUN+="/lib/udev/remove_floppy_devices.sh %k"
|
---|
| 130 |
|
---|
| 131 | # block devices
|
---|
| 132 | SUBSYSTEM=="block", GROUP="disk", MODE="0640"
|
---|
| 133 |
|
---|
| 134 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
|
---|
| 135 | # sr: 4 TYPE_WORM, 5 TYPE_ROM
|
---|
| 136 | # st/osst: 1 TYPE_TAPE
|
---|
| 137 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
|
---|
| 138 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
|
---|
| 139 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
|
---|
| 140 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
|
---|
| 141 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
|
---|
| 142 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
|
---|
| 143 | SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
|
---|
| 144 |
|
---|
| 145 | # IDE modules
|
---|
| 146 | SUBSYSTEM=="ide", ACTION=="add", RUN+="/lib/udev/load_ide_modules.sh"
|
---|
| 147 |
|
---|
| 148 | # device mapper
|
---|
| 149 | KERNEL=="device-mapper", ACTION=="add", NAME="%k", SYMLINK+="mapper/control"
|
---|
| 150 |
|
---|
| 151 | # check fstab and possibly mount
|
---|
| 152 | SUBSYSTEM=="block", KERNEL=="sd*[0-9]|hd*[0-9]", ACTION=="add", RUN+="/lib/udev/mount.sh"
|
---|
| 153 |
|
---|
| 154 | # misc storage devices (non-block)
|
---|
| 155 | KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
|
---|
| 156 | KERNEL=="st*", NAME="%k", GROUP="disk"
|
---|
| 157 | KERNEL=="nst*", NAME="%k", GROUP="disk"
|
---|
| 158 | KERNEL=="initrd", NAME="%k", GROUP="disk"
|
---|
| 159 | KERNEL=="qft*", NAME="%k", GROUP="disk"
|
---|
| 160 | KERNEL=="nqft*", NAME="%k", GROUP="disk"
|
---|
| 161 | KERNEL=="zqft*", NAME="%k", GROUP="disk"
|
---|
| 162 | KERNEL=="nzqft*", NAME="%k", GROUP="disk"
|
---|
| 163 | KERNEL=="rawqft*", NAME="%k", GROUP="disk"
|
---|
| 164 | KERNEL=="nrawqft*", NAME="%k", GROUP="disk"
|
---|
| 165 | KERNEL=="pf*", NAME="%k", GROUP="disk"
|
---|
| 166 | KERNEL=="sch*", NAME="%k", GROUP="disk"
|
---|
| 167 | KERNEL=="pt*", NAME="%k", GROUP="disk"
|
---|
| 168 | KERNEL=="npt*", NAME="%k", GROUP="disk"
|
---|
| 169 | KERNEL=="pg*", NAME="%k", GROUP="disk"
|
---|
| 170 | KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
|
---|
| 171 | KERNEL=="rawctl*", NAME="%k", GROUP="disk"
|
---|
| 172 | KERNEL=="osst*", NAME="%k", GROUP="disk"
|
---|
| 173 | KERNEL=="nosst*", NAME="%k", GROUP="disk"
|
---|
| 174 | KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
|
---|
| 175 | KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
|
---|
| 176 | KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
|
---|
| 177 |
|
---|
| 178 | # libusb device access
|
---|
| 179 | SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
|
---|
| 180 |
|
---|
| 181 | # firmware loader
|
---|
| 182 | SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"
|
---|