aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-11-15 03:51:04 +0000
committerBill Nottingham <notting@redhat.com>2004-11-15 03:51:04 +0000
commit0cbbd0af0233cf952271c2eddaea01e6e21763cc (patch)
tree926ffa20a02d85db87bc81e42de4f40f3efea339
parent7754390544061ea57df9cde4d7aa532e084d766f (diff)
downloadinitscripts-0cbbd0af0233cf952271c2eddaea01e6e21763cc.tar
initscripts-0cbbd0af0233cf952271c2eddaea01e6e21763cc.tar.gz
initscripts-0cbbd0af0233cf952271c2eddaea01e6e21763cc.tar.bz2
initscripts-0cbbd0af0233cf952271c2eddaea01e6e21763cc.tar.xz
initscripts-0cbbd0af0233cf952271c2eddaea01e6e21763cc.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 7f7bc556..e2748ec8 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -252,23 +252,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
}