aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-07-28 05:37:41 +0000
committerBill Nottingham <notting@redhat.com>2001-07-28 05:37:41 +0000
commite2333d7d1efc6adabca1805f2131c750994cba02 (patch)
treeadf9a362aeaee397e6647611d5ebd6e40cdec773
parentd52ae28ce5a8cec29cbf9b6018d85920c6cd51a1 (diff)
downloadinitscripts-e2333d7d1efc6adabca1805f2131c750994cba02.tar
initscripts-e2333d7d1efc6adabca1805f2131c750994cba02.tar.gz
initscripts-e2333d7d1efc6adabca1805f2131c750994cba02.tar.bz2
initscripts-e2333d7d1efc6adabca1805f2131c750994cba02.tar.xz
initscripts-e2333d7d1efc6adabca1805f2131c750994cba02.zip
return link up in check_link_down for EINVAL too; in fact, return link up if mii-tool fails for any reason
-rw-r--r--sysconfig/network-scripts/network-functions3
1 files changed, 3 insertions, 0 deletions
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