aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-03-13 11:24:10 -0400
committerBill Nottingham <notting@redhat.com>2008-03-13 11:24:10 -0400
commit74f9f39c28c7efac22dd04be7babff73ae9f735a (patch)
treea427026aa98240d5832a92aafcfbc298acce16e4
parent485377354f5c4119d9b93f585ad228bdf4e0254a (diff)
downloadinitscripts-74f9f39c28c7efac22dd04be7babff73ae9f735a.tar
initscripts-74f9f39c28c7efac22dd04be7babff73ae9f735a.tar.gz
initscripts-74f9f39c28c7efac22dd04be7babff73ae9f735a.tar.bz2
initscripts-74f9f39c28c7efac22dd04be7babff73ae9f735a.tar.xz
initscripts-74f9f39c28c7efac22dd04be7babff73ae9f735a.zip
Improve performance of s390 ccw rules (#437110, <mernst@de.ibm.com>)
-rwxr-xr-xsrc/ccw_init13
-rw-r--r--udev/rules.d/55-ccw.rules10
2 files changed, 16 insertions, 7 deletions
diff --git a/src/ccw_init b/src/ccw_init
index 707ae009..beeaf8bf 100755
--- a/src/ccw_init
+++ b/src/ccw_init
@@ -3,7 +3,7 @@
[ -z "$DEVPATH" ] && exit 0
[ "$SUBSYSTEM" != "ccw" ] && exit 0
-. /etc/init.d/functions
+NOLOCALE="yes"
. /etc/sysconfig/network-scripts/network-functions
@@ -13,15 +13,16 @@ CHANNEL=${DEVPATH##*/}
CONFIG=$(get_config_by_subchannel $CHANNEL)
-cd /etc/sysconfig/network-scripts
-
-source_config
+if [ -n "$CONFIG" ]; then
+ cd /etc/sysconfig/network-scripts
+ source_config
+fi
# SUBCHANNELS is only set on mainframe ccwgroup devices
-[ -z "$SUBCHANNELS" -o -z "$NETTYPE" ] && return
+[ -z "$SUBCHANNELS" -o -z "$NETTYPE" ] && exit 0
DIR="/sys/bus/ccwgroup/drivers/$NETTYPE"
SYSDIR="$DIR/${SUBCHANNELS//,*/}"
-[ ! -e $DIR/group ] && return
+[ ! -e $DIR/group ] && exit 0
echo "$SUBCHANNELS" > $DIR/group
if [ -n "$PORTNAME" ]; then
if [ "$NETTYPE" = "lcs" ]; then
diff --git a/udev/rules.d/55-ccw.rules b/udev/rules.d/55-ccw.rules
index d32f125a..dc0db663 100644
--- a/udev/rules.d/55-ccw.rules
+++ b/udev/rules.d/55-ccw.rules
@@ -1 +1,9 @@
-ACTION=="add", SUBSYSTEM=="ccw", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="1731/01", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="1731/05", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="1731/06", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/01", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/08", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/60", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/61", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/1E", RUN+="/lib/udev/ccw_init"
+ACTION=="add", SUBSYSTEM=="ccw", SYSFS{cutype}=="3088/1F", RUN+="/lib/udev/ccw_init"