[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 | # console
|
---|
| 18 | KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 19 | KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 20 | KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 21 | KERNEL=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 22 | KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 23 | KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
|
---|
| 24 | KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
|
---|
| 25 | KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
|
---|
| 26 |
|
---|
| 27 | # serial devices
|
---|
| 28 | KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
|
---|
| 29 | KERNEL=="pppox*", NAME="%k", GROUP="uucp"
|
---|
| 30 | KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
|
---|
| 31 | KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
|
---|
| 32 | KERNEL=="hvc*", NAME="%k", GROUP="uucp"
|
---|
| 33 | KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
|
---|
| 34 | KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
|
---|
| 35 | KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot"
|
---|
| 36 |
|
---|
| 37 | # video/graphics
|
---|
| 38 | SUBSYSTEM=="video4linux", GROUP="video"
|
---|
| 39 | SUBSYSTEM=="graphics" GROUP="video"
|
---|
| 40 | KERNEL=="vtx*", NAME="%k", GROUP="video"
|
---|
| 41 | KERNEL=="vbi*", NAME="%k", GROUP="video"
|
---|
| 42 | KERNEL=="winradio*", NAME="%k", GROUP="video"
|
---|
| 43 | KERNEL=="vttuner*", NAME="%k", GROUP="video"
|
---|
| 44 | KERNEL=="nvidia*", NAME="%k", GROUP="video"
|
---|
| 45 | KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
|
---|
| 46 | KERNEL=="video0", SYMLINK+="video"
|
---|
| 47 | KERNEL=="radio0", SYMLINK+="radio"
|
---|
| 48 | KERNEL=="vbi0", SYMLINK+="vbi"
|
---|
| 49 | KERNEL=="pmu", GROUP="video"
|
---|
| 50 |
|
---|
| 51 | # dvb
|
---|
| 52 | SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
|
---|
| 53 |
|
---|
| 54 | # input devices
|
---|
| 55 | KERNEL=="mice", NAME="input/%k", MODE="0640"
|
---|
| 56 | KERNEL=="mouse*", NAME="input/%k", MODE="0640"
|
---|
| 57 | KERNEL=="event*", NAME="input/%k", MODE="0640"
|
---|
| 58 | KERNEL=="js*", NAME="input/%k", MODE="0644"
|
---|
| 59 | KERNEL=="ts*", NAME="input/%k", MODE="0600"
|
---|
| 60 | KERNEL=="uinput", NAME="input/%k", MODE="0600"
|
---|
| 61 | KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
|
---|
[a6cd72e] | 62 | KERNEL=="input[0-9]*", ACTION=="add", RUN+="input.sh"
|
---|
[7e161ea] | 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"
|
---|
| 81 | # 219 /dev/modems/mwave MWave modem firmware upload
|
---|
| 82 | KERNEL=="mwave", NAME="modems/%k"
|
---|
| 83 | # 169 /dev/specialix_rioctl Specialix RIO serial control
|
---|
| 84 | KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
|
---|
| 85 | # 167 /dev/specialix_sxctl Specialix serial control
|
---|
| 86 | KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
|
---|
| 87 |
|
---|
[a6cd72e] | 88 | # network
|
---|
| 89 | KERNEL=="tun", NAME="net/%k", MODE="0600"
|
---|
| 90 |
|
---|
[7e161ea] | 91 | # misc devices
|
---|
| 92 | KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 93 | KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 94 | KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
|
---|
| 95 | KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
|
---|
| 96 | KERNEL=="null", NAME="%k", MODE="666"
|
---|
| 97 | KERNEL=="zero", NAME="%k", MODE="666"
|
---|
| 98 | KERNEL=="full", NAME="%k", MODE="622"
|
---|
| 99 | KERNEL=="random", NAME="%k", MODE="666"
|
---|
| 100 | KERNEL=="urandom", NAME="%k", MODE="644"
|
---|
| 101 | KERNEL=="rtc", GROUP="audio"
|
---|
| 102 | KERNEL=="sonypi", MODE="0666"
|
---|
| 103 | KERNEL=="agpgart", MODE="0600", GROUP="video"
|
---|
| 104 | KERNEL=="djs*", NAME="%k", MODE="644"
|
---|
| 105 | KERNEL=="sgi_*", NAME="%k", MODE="666"
|
---|
| 106 | KERNEL=="rrom*", NAME="%k", MODE="400"
|
---|
| 107 | KERNEL=="rflash*", NAME="%k", MODE="400"
|
---|
| 108 | KERNEL=="usbscanner*", NAME="%k", MODE="644"
|
---|
| 109 | KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
|
---|
| 110 | KERNEL=="3270/tub*", NAME="%k", MODE="666"
|
---|
| 111 | KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
|
---|
| 112 | KERNEL=="ica", NAME="%k", MODE="666"
|
---|
| 113 | KERNEL=="z90crypt", NAME="%k", MODE="666"
|
---|
| 114 | KERNEL=="mmtimer", NAME="%k", MODE="444"
|
---|
| 115 | KERNEL=="auer[0-9]*" NAME="usb/%k"
|
---|
| 116 |
|
---|
[a6cd72e] | 117 | # packet writing interface
|
---|
[7e161ea] | 118 | KERNEL=="pktcdvd", NAME="pktcdvd/control"
|
---|
| 119 | KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
|
---|
| 120 |
|
---|
| 121 | # fix floppy devices
|
---|
[a6cd72e] | 122 | KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
|
---|
| 123 | KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
|
---|
| 124 | KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
|
---|
[7e161ea] | 125 |
|
---|
| 126 | # block devices
|
---|
| 127 | SUBSYSTEM=="block", GROUP="disk", MODE="0640"
|
---|
| 128 |
|
---|
| 129 | # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
|
---|
| 130 | # sr: 4 TYPE_WORM, 5 TYPE_ROM
|
---|
| 131 | # st/osst: 1 TYPE_TAPE
|
---|
| 132 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
|
---|
| 133 | ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
|
---|
| 134 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
|
---|
| 135 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
|
---|
| 136 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
|
---|
| 137 | SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
|
---|
| 138 | SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
|
---|
| 139 |
|
---|
[a6cd72e] | 140 | # load IDE modules
|
---|
| 141 | SUBSYSTEM=="ide", ACTION=="add", RUN+="ide.sh"
|
---|
[7e161ea] | 142 |
|
---|
| 143 | # device mapper
|
---|
[a6cd72e] | 144 | KERNEL=="device-mapper", NAME="%k", SYMLINK+="mapper/control"
|
---|
[7e161ea] | 145 |
|
---|
| 146 | # check fstab and possibly mount
|
---|
[a6cd72e] | 147 | SUBSYSTEM=="block", ACTION=="add", KERNEL=="sd*[0-9]|hd*[0-9]", RUN+="mount.sh"
|
---|
[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
|
---|
| 177 | SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
|
---|