diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-08-29 13:19:16 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-29 13:19:16 +0200 |
commit | 739b614721580b95aebdfd295eebb0a6246803ad (patch) | |
tree | fd8d03bd5565863339fb7208431a050807d0fc17 /etc/udev/gentoo | |
parent | 7b6fd01651ce89e4985f9afc344b7d49c4e5fcd7 (diff) |
rules: Gentoo update
Diffstat (limited to 'etc/udev/gentoo')
-rw-r--r-- | etc/udev/gentoo/05-udev-early.rules | 8 | ||||
-rw-r--r-- | etc/udev/gentoo/30-kernel-compat.rules | 47 | ||||
-rw-r--r-- | etc/udev/gentoo/50-udev.rules | 4 | ||||
-rw-r--r-- | etc/udev/gentoo/80-drivers.rules | 44 |
4 files changed, 47 insertions, 56 deletions
diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules deleted file mode 100644 index fc15e2bb63..0000000000 --- a/etc/udev/gentoo/05-udev-early.rules +++ /dev/null @@ -1,8 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# sysfs is populated after the event is sent -ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" -ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" -ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" - diff --git a/etc/udev/gentoo/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules new file mode 100644 index 0000000000..7bc55c6f75 --- /dev/null +++ b/etc/udev/gentoo/30-kernel-compat.rules @@ -0,0 +1,47 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="kernel_compat_end" + +# workarounds needed to synchronize with sysfs +DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" + +# needed for kernels <2.6.16 +SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" + +# needed for kernels <2.6.17 +SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + + + +# needed for kernels <2.6.22 +SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" + + + +# this driver is broken and should not be loaded automatically +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962 +# needed for kernels <2.6.21 +SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}="" + +# No need for more code, as MODALIAS is present +ENV{MODALIAS}=="?*", GOTO="kernel_compat_end" + +# needed for kernels <2.6.22 +SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end" + + # Parts taken from redhat-rules + # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC + # sr: 4 TYPE_WORM, 5 TYPE_ROM + # st/osst: 1 TYPE_TAPE + + ATTRS{type}=="0|7|14", RUN+="modprobe.sh sd_mod" + ATTRS{type}=="4|5", RUN+="modprobe.sh sr_mod" + ATTRS{type}=="8", RUN+="modprobe.sh ch" + + ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ + ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end" + ATTRS{type}=="1", RUN+="modprobe.sh st" + +LABEL="kernel_compat_end" + + diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules index 9e06029af3..7c2ac81b9f 100644 --- a/etc/udev/gentoo/50-udev.rules +++ b/etc/udev/gentoo/50-udev.rules @@ -237,10 +237,6 @@ KERNEL=="umad*", NAME="infiniband/%k" KERNEL=="issm*", NAME="infiniband/%k" -# usbfs-like device nodes -# the way to go up to kernel 2.6.21 (and above if setting USB_DEVICE_CLASS=y) -SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664" -# starting from kernel 2.6.22 use this rule SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules deleted file mode 100644 index df6c8802bb..0000000000 --- a/etc/udev/gentoo/80-drivers.rules +++ /dev/null @@ -1,44 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION!="add", GOTO="drivers_end" - -# check if the device has already been claimed by a driver -ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="drivers_end" - -# this driver is broken and should not be loaded automatically -SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="drivers_end" - -# Autoload modules that lack aliases but have them defined in autoload modules -ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}" - -# /etc/modprobe.conf. -SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'" -# needed aliases are defined in /etc/modprobe.d/pnp-aliases - - -SUBSYSTEM=="i2o", RUN+="modprobe.sh i2o_block" -SUBSYSTEM=="mmc", RUN+="modprobe.sh mmc_block" -SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd" -SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms" -SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi" - -# Load driver for scsi-device -SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end" - - # Parts taken from redhat-rules - # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC - # sr: 4 TYPE_WORM, 5 TYPE_ROM - # st/osst: 1 TYPE_TAPE - - ATTRS{type}=="?*", TEST!="[module/sg]", RUN+="modprobe.sh sg" - ATTRS{type}=="0|7|14", RUN+="modprobe.sh sd_mod" - ATTRS{type}=="4|5", RUN+="modprobe.sh sr_mod" - ATTRS{type}=="8", RUN+="modprobe.sh ch" - - ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \ - ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end" - ATTRS{type}=="1", RUN+="modprobe.sh st" -LABEL="hotplug_scsi_end" - -LABEL="drivers_end" - |