2005-11-25 21:30:33 +03:00
# ignore these events until someone needs them
SUBSYSTEM=="drivers", OPTIONS="last_rule"
SUBSYSTEM=="module", OPTIONS="last_rule"
2005-08-09 14:29:12 +04:00
# console
KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
KERNEL=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
2005-11-25 21:30:33 +03:00
KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
2005-08-09 14:29:12 +04:00
# serial devices
KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
KERNEL=="pppox*", NAME="%k", GROUP="uucp"
KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
KERNEL=="hvc*", NAME="%k", GROUP="uucp"
KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
2005-11-10 03:07:51 +03:00
KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot"
2005-08-09 14:29:12 +04:00
# video/graphics
SUBSYSTEM=="video4linux", GROUP="video"
SUBSYSTEM=="graphics" GROUP="video"
KERNEL=="vtx*", NAME="%k", GROUP="video"
KERNEL=="vbi*", NAME="%k", GROUP="video"
KERNEL=="winradio*", NAME="%k", GROUP="video"
KERNEL=="vttuner*", NAME="%k", GROUP="video"
KERNEL=="nvidia*", NAME="%k", GROUP="video"
KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
2005-08-25 04:30:01 +04:00
KERNEL=="video0", SYMLINK+="video"
2005-08-26 16:27:13 +04:00
KERNEL=="radio0", SYMLINK+="radio"
2005-09-08 05:53:54 +04:00
KERNEL=="vbi0", SYMLINK+="vbi"
KERNEL=="pmu", GROUP="video"
2005-08-09 14:29:12 +04:00
# dvb
2005-11-10 03:07:51 +03:00
SUBSYSTEM="dvb", PROGRAM="/bin/sh -c 'X=%k; X=$${X#dvb}; A=$${X%%%%.*}; D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"
2005-08-09 14:29:12 +04:00
2005-09-06 22:33:59 +04:00
# Kino jogshuttle support
SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="b33/10/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="5f3/240/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
2005-08-09 14:29:12 +04:00
# input devices
KERNEL=="mice", NAME="input/%k", MODE="0640"
KERNEL=="mouse*", NAME="input/%k", MODE="0640"
KERNEL=="event*", NAME="input/%k", MODE="0640"
KERNEL=="js*", NAME="input/%k", MODE="0644"
KERNEL=="ts*", NAME="input/%k", MODE="0600"
KERNEL=="uinput", NAME="input/%k", MODE="0600"
KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
2005-11-25 21:30:33 +03:00
KERNEL=="input[0-9]*", RUN+="/lib/udev/input_device.sh"
KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"
2005-08-09 14:29:12 +04:00
# printer
2005-11-25 21:30:33 +03:00
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
2005-08-09 14:29:12 +04:00
KERNEL=="irlpt*", NAME="%k", GROUP="lp"
# cpu devices
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
# IEEE1394 devices
KERNEL=="raw1394*", NAME="%k", GROUP="video"
KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
# 183 = /dev/hwrng Generic random number generator
KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
# 219 /dev/modems/mwave MWave modem firmware upload
KERNEL=="mwave", NAME="modems/%k"
# 169 /dev/specialix_rioctl Specialix RIO serial control
KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
# 167 /dev/specialix_sxctl Specialix serial control
KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
# misc devices
KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
2005-08-25 04:30:01 +04:00
KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
2005-08-09 14:29:12 +04:00
KERNEL=="null", NAME="%k", MODE="666"
KERNEL=="zero", NAME="%k", MODE="666"
KERNEL=="full", NAME="%k", MODE="622"
KERNEL=="random", NAME="%k", MODE="666"
KERNEL=="urandom", NAME="%k", MODE="644"
KERNEL=="rtc", GROUP="audio"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", MODE="0600", GROUP="video"
KERNEL=="djs*", NAME="%k", MODE="644"
KERNEL=="sgi_*", NAME="%k", MODE="666"
KERNEL=="rrom*", NAME="%k", MODE="400"
KERNEL=="rflash*", NAME="%k", MODE="400"
KERNEL=="usbscanner*", NAME="%k", MODE="644"
KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
KERNEL=="3270/tub*", NAME="%k", MODE="666"
KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
KERNEL=="ica", NAME="%k", MODE="666"
KERNEL=="z90crypt", NAME="%k", MODE="666"
KERNEL=="mmtimer", NAME="%k", MODE="444"
2005-11-10 03:07:51 +03:00
KERNEL=="auer[0-9]*" NAME="usb/%k"
2005-11-25 21:30:33 +03:00
KERNEL=="pktcdvd", NAME="pktcdvd/control"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
2005-08-09 14:29:12 +04:00
# fix floppy devices
2005-11-25 21:30:33 +03:00
KERNEL=="nvram", ACTION=="add", RUN+="/lib/udev/load_floppy_module.sh"
KERNEL=="fd*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="/lib/udev/create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
KERNEL=="fd*", ACTION=="remove", RUN+="/lib/udev/remove_floppy_devices.sh %k"
2005-08-09 14:29:12 +04:00
# block devices
SUBSYSTEM=="block", GROUP="disk", MODE="0640"
2005-08-26 16:27:13 +04:00
2005-11-25 21:30:33 +03:00
# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
# sr: 4 TYPE_WORM, 5 TYPE_ROM
# st/osst: 1 TYPE_TAPE
ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
2005-08-26 16:27:13 +04:00
SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
# Treat osst as a unique case, that is, osst will load more often than
2005-11-25 21:30:33 +03:00
SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="OnStream", RUN+="/sbin/modprobe osst"
2005-08-09 14:29:12 +04:00
SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
2005-08-26 16:27:13 +04:00
SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
# IDE/ATAPI handling
2005-11-10 03:07:51 +03:00
SUBSYSTEM=="ide", ACTION=="add", RUN+="/lib/udev/load_ide_modules.sh"
2005-11-25 21:30:33 +03:00
# device mapper
2005-11-10 03:07:51 +03:00
KERNEL=="device-mapper", ACTION=="add", NAME="%k", SYMLINK+="mapper/control"
# check fstab and possibly mount
SUBSYSTEM=="block", KERNEL=="sd*[0-9]|hd*[0-9]", ACTION=="add", RUN+="/lib/udev/mount.sh"
2005-08-09 14:29:12 +04:00
# misc storage devices (non-block)
KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
KERNEL=="st*", NAME="%k", GROUP="disk"
KERNEL=="nst*", NAME="%k", GROUP="disk"
KERNEL=="initrd", NAME="%k", GROUP="disk"
KERNEL=="qft*", NAME="%k", GROUP="disk"
KERNEL=="nqft*", NAME="%k", GROUP="disk"
KERNEL=="zqft*", NAME="%k", GROUP="disk"
KERNEL=="nzqft*", NAME="%k", GROUP="disk"
KERNEL=="rawqft*", NAME="%k", GROUP="disk"
KERNEL=="nrawqft*", NAME="%k", GROUP="disk"
KERNEL=="pf*", NAME="%k", GROUP="disk"
KERNEL=="sch*", NAME="%k", GROUP="disk"
KERNEL=="pt*", NAME="%k", GROUP="disk"
KERNEL=="npt*", NAME="%k", GROUP="disk"
KERNEL=="pg*", NAME="%k", GROUP="disk"
KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
KERNEL=="rawctl*", NAME="%k", GROUP="disk"
KERNEL=="osst*", NAME="%k", GROUP="disk"
KERNEL=="nosst*", NAME="%k", GROUP="disk"
KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
2005-11-25 21:30:33 +03:00
# libusb device access
2005-11-10 03:07:51 +03:00
SUBSYSTEM="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
2005-08-09 14:29:12 +04:00
# firmware loader
2005-11-10 03:07:51 +03:00
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"
2005-08-09 14:29:12 +04:00