summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-08-10 12:36:59 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-08-10 12:36:59 +0200
commitd638611c44672dea8d8a498dbe84c7d650ef2194 (patch)
treee710fe665d39ae9c983fe61b3d634af241ee13d3
parent7134ab1b332250e03b58da9f39e1823f2ae6c172 (diff)
rules: add default rules
-rw-r--r--etc/udev/rules.d/50-udev-default.rules104
-rw-r--r--etc/udev/rules.d/80-drivers.rules14
2 files changed, 118 insertions, 0 deletions
diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
new file mode 100644
index 0000000000..35ac99e362
--- /dev/null
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -0,0 +1,104 @@
+# do not edit this file, it will be overwritten on update
+
+KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule"
+KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0660", OPTIONS="last_rule"
+KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule"
+KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", OPTIONS="last_rule"
+KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", OPTIONS="last_rule"
+KERNEL=="console", MODE="0600", OPTIONS="last_rule"
+KERNEL=="tty0", SYMLINK+="systty"
+
+# serial
+KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
+KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove"
+KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp"
+KERNEL=="hvc*|hvsi*", GROUP="uucp"
+KERNEL=="lirc0", SYMLINK+="lirc"
+
+# mem
+KERNEL=="null|zero|random", MODE="0666"
+KERNEL=="null", SYMLINK+="XOR"
+KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+KERNEL=="nvram", GROUP="kmem", MODE="0600"
+KERNEL=="ram0", SYMLINK+="ramdisk"
+KERNEL=="ram1", SYMLINK+="ram"
+KERNEL=="urandom", MODE="0644"
+KERNEL=="full", MODE="0666"
+
+# input
+KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640"
+KERNEL=="ts[0-9]*|uinput", NAME="input/%k", MODE="0600"
+KERNEL=="js[0-9]*", NAME="input/%k", MODE="0644", SYMLINK+="%k"
+
+# video4linux
+KERNEL=="vbi0", SYMLINK+="vbi"
+KERNEL=="radio0", SYMLINK+="radio"
+KERNEL=="video0", SYMLINK+="video"
+
+# graphics
+KERNEL=="agpgart", MODE="0600"
+KERNEL=="card[0-9]*", NAME="dri/%k", MODE="0666"
+KERNEL=="fb0", SYMLINK+="fb"
+
+# DVB video
+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c"
+
+# Firewire
+KERNEL=="dv1394*", SYMLINK+="dv1394/%n"
+KERNEL=="video1394*", NAME="video1394/%n"
+
+# firmware class requests
+SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
+
+# libusb device nodes
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
+
+# printer
+KERNEL=="parport[0-9]*", GROUP="lp"
+SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
+SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
+KERNEL=="lp[0-9]*", GROUP="lp" SYMLINK+="par%n"
+KERNEL=="irlpt[0-9]*", GROUP="lp"
+
+# block, tapes, block-releated
+SUBSYSTEM=="block", GROUP="disk", MODE="0640"
+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="0|7|14", ATTR{timeout}="60"
+SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", ACTION=="add", ATTR{type}=="1", ATTR{timeout}="900"
+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
+KERNEL=="fd[0-9]", GROUP="floppy"
+KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
+KERNEL=="sch[0-9]*", GROUP="disk"
+KERNEL=="sg[0-9]*", GROUP="disk", MODE="0640"
+KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk""
+KERNEL=="pg[0-9]*", GROUP="disk"
+KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk"
+KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
+KERNEL=="rawctl", NAME="raw/%k", GROUP="disk"
+SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
+KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
+KERNEL=="pktcdvd", NAME="pktcdvd/control"
+KERNEL=="qft0", SYMLINK+="ftape"
+
+# network
+KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+
+# CPU
+KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
+KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
+KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
+
+# miscellaneous
+KERNEL=="fuse", MODE="0666"
+KERNEL=="rtc", MODE="0644"
+KERNEL=="auer[0-9]*" NAME="usb/%k"
+KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
+KERNEL=="mmtimer", MODE="0644"
+KERNEL=="rflash[0-9]*", MODE="0400"
+KERNEL=="rrom[0-9]*", MODE="0400"
+KERNEL=="sbpcd0", SYMLINK+="sbpcd"
+KERNEL=="slram[0-9]*", SYMLINK+="xpram%n"
+KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
+KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
+
diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules
new file mode 100644
index 0000000000..c7ba54fe4f
--- /dev/null
+++ b/etc/udev/rules.d/80-drivers.rules
@@ -0,0 +1,14 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add", GOTO="drivers_end"
+
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODALIAS}"
+SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \
+ RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
+SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms"
+SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
+SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
+SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg"
+
+LABEL="drivers_end"
+