From 2bf0a506bc13abc5632079232bee6f8784934633 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 26 Aug 2007 13:54:32 +0200 Subject: rules: Gentoo update --- etc/udev/gentoo/05-udev-early.rules | 7 +++-- etc/udev/gentoo/50-udev.rules | 8 ++---- etc/udev/gentoo/80-drivers.rules | 44 ++++++++++++++++++++++++++++++ etc/udev/gentoo/80-hotplug.rules | 54 ------------------------------------- etc/udev/gentoo/90-network.rules | 8 ++++++ etc/udev/gentoo/95-udev-late.rules | 18 ------------- 6 files changed, 57 insertions(+), 82 deletions(-) create mode 100644 etc/udev/gentoo/80-drivers.rules delete mode 100644 etc/udev/gentoo/80-hotplug.rules create mode 100644 etc/udev/gentoo/90-network.rules delete mode 100644 etc/udev/gentoo/95-udev-late.rules diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules index ee349dc981..fc15e2bb63 100644 --- a/etc/udev/gentoo/05-udev-early.rules +++ b/etc/udev/gentoo/05-udev-early.rules @@ -1,9 +1,8 @@ -# ignore these events until someone needs them -SUBSYSTEM=="drivers", OPTIONS="ignore_device" -SUBSYSTEM=="module", OPTIONS="ignore_device" +# do not edit this file, it will be overwritten on update # sysfs is populated after the event is sent -ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" 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/50-udev.rules b/etc/udev/gentoo/50-udev.rules index dd329712dd..9e06029af3 100644 --- a/etc/udev/gentoo/50-udev.rules +++ b/etc/udev/gentoo/50-udev.rules @@ -1,13 +1,9 @@ +# do not edit this file, it will be overwritten on update + # /etc/udev/rules/50-udev.rules: device naming rules for udev # # Gentoo specific rules # -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# # Net devices can have arbitrary names, even # ones set by the user. Not try to match normal diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules new file mode 100644 index 0000000000..df6c8802bb --- /dev/null +++ b/etc/udev/gentoo/80-drivers.rules @@ -0,0 +1,44 @@ +# 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" + diff --git a/etc/udev/gentoo/80-hotplug.rules b/etc/udev/gentoo/80-hotplug.rules deleted file mode 100644 index 0637dbc83a..0000000000 --- a/etc/udev/gentoo/80-hotplug.rules +++ /dev/null @@ -1,54 +0,0 @@ -# /etc/udev/rules/80-hotplug.rules: module loading rules for udev -# -# Gentoo specific rules -# -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# - -# Module autoloading -ACTION!="add", GOTO="hotplug_load_end" - -# check if the device has already been claimed by a driver -ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end" - -# this driver is broken and should not be loaded automatically -SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_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="hotplug_load_end" - diff --git a/etc/udev/gentoo/90-network.rules b/etc/udev/gentoo/90-network.rules new file mode 100644 index 0000000000..50903af157 --- /dev/null +++ b/etc/udev/gentoo/90-network.rules @@ -0,0 +1,8 @@ +# do not edit this file, it will be overwritten on update + +# /etc/udev/rules/90-network.rules: triggering network init-scripts + +# Activate our network if we can +SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start" +SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop" + diff --git a/etc/udev/gentoo/95-udev-late.rules b/etc/udev/gentoo/95-udev-late.rules deleted file mode 100644 index 40ada28b14..0000000000 --- a/etc/udev/gentoo/95-udev-late.rules +++ /dev/null @@ -1,18 +0,0 @@ -# /etc/udev/rules/95-udev-late.rules: device naming rules for udev -# -# Gentoo specific rules -# -# There are a number of modifiers that are allowed to be used in some of the -# fields. See the udev man page for a full description of them. -# -# Try not to modify this file, if you wish to change things, create a new rule -# file that can be run before this one. -# - -# Activate our network if we can -SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start" -SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop" - -# event to be catched by udevmonitor -RUN+="socket:/org/kernel/udev/monitor" - -- cgit v1.2.3-54-g00ecf