aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-11-15 03:50:47 +0000
committerBill Nottingham <notting@redhat.com>2004-11-15 03:50:47 +0000
commit0338576fe8cddeedfe99f5c12c3d9cd36064e812 (patch)
tree755a4f734408258350ee7f5f2cebd9b2b53a96e6
parent9eb787938369cd31fed755c71069dd986b224bc9 (diff)
downloadinitscripts-0338576fe8cddeedfe99f5c12c3d9cd36064e812.tar
initscripts-0338576fe8cddeedfe99f5c12c3d9cd36064e812.tar.gz
initscripts-0338576fe8cddeedfe99f5c12c3d9cd36064e812.tar.bz2
initscripts-0338576fe8cddeedfe99f5c12c3d9cd36064e812.tar.xz
initscripts-0338576fe8cddeedfe99f5c12c3d9cd36064e812.zip
fix check_link_down to still check negotiation if link is listed as "up" on entering (#110164, <dbaron@dbaron.org>
-rw-r--r--sysconfig/network-scripts/network-functions32
1 files changed, 16 insertions, 16 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index c8321c20..03c0da16 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -263,23 +263,23 @@ check_link_down ()
if [ -x /sbin/mii-tool -o -x /sbin/ethtool ]; then
if ! LC_ALL=C ip link show dev $1 2>/dev/null| grep -q UP ; then
ip link set dev $1 up >/dev/null 2>&1
- timeout=0
- while [ $timeout -le 10 ]; do
- check_mii_tool $1
- m=$?
- check_ethtool $1
- e=$?
- if [ $m -eq 1 ] || [ $e -eq 1 ] ; then
- return 1
- fi
- if [ $m -eq 2 ] && [ $e -eq 2 ] ; then
- return 1
- fi
- usleep 500000
- timeout=$((timeout+1))
- done
- return 0
fi
+ timeout=0
+ while [ $timeout -le 10 ]; do
+ check_mii_tool $1
+ m=$?
+ check_ethtool $1
+ e=$?
+ if [ $m -eq 1 ] || [ $e -eq 1 ] ; then
+ return 1
+ fi
+ if [ $m -eq 2 ] && [ $e -eq 2 ] ; then
+ return 1
+ fi
+ usleep 500000
+ timeout=$((timeout+1))
+ done
+ return 0
fi
return 1
}