From e2333d7d1efc6adabca1805f2131c750994cba02 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sat, 28 Jul 2001 05:37:41 +0000 Subject: return link up in check_link_down for EINVAL too; in fact, return link up if mii-tool fails for any reason --- sysconfig/network-scripts/network-functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 995f3f95..f759682e 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -122,9 +122,12 @@ check_link_down () if [ -x /sbin/mii-tool ]; then LC_ALL=C ip link show $1 2>/dev/null| grep -q UP || ip link set $1 up >/dev/null 2>&1 sleep 2 + /sbin/mii-tool >/dev/null 2>&1 || return 1 output=`LC_ALL=C /sbin/mii-tool $1 2>&1` if echo $output | grep -q "Operation not supported"; then return 1 + elif echo $output | grep -q "Invalid argument"; then + return 1 elif echo $output | grep -q "link ok"; then return 1 elif echo $output | grep -q "No MII transceiver present"; then -- cgit v1.2.1