aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-11-15 03:49:50 +0000
committerBill Nottingham <notting@redhat.com>2004-11-15 03:49:50 +0000
commitad6f6657dd4f4eb884740a85eb75789f87e13bdf (patch)
tree20c811764cc840e9eb22199f820aee69b0df32cd /sysconfig
parentb4a6cdaa7911aa584bc5b9685ab565575fd5beb9 (diff)
downloadinitscripts-ad6f6657dd4f4eb884740a85eb75789f87e13bdf.tar
initscripts-ad6f6657dd4f4eb884740a85eb75789f87e13bdf.tar.gz
initscripts-ad6f6657dd4f4eb884740a85eb75789f87e13bdf.tar.bz2
initscripts-ad6f6657dd4f4eb884740a85eb75789f87e13bdf.tar.xz
initscripts-ad6f6657dd4f4eb884740a85eb75789f87e13bdf.zip
fix check_link_down to still check negotiation if link is listed as "up" on entering (#110164, <dbaron@dbaron.org>
Diffstat (limited to 'sysconfig')
-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 a774031a..05116839 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -262,23 +262,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
}