From 74f9f39c28c7efac22dd04be7babff73ae9f735a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 13 Mar 2008 11:24:10 -0400 Subject: Improve performance of s390 ccw rules (#437110, ) --- src/ccw_init | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.1