From ad6f6657dd4f4eb884740a85eb75789f87e13bdf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Nov 2004 03:49:50 +0000 Subject: fix check_link_down to still check negotiation if link is listed as "up" on entering (#110164, --- sysconfig/network-scripts/network-functions | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'sysconfig/network-scripts/network-functions') 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 } -- cgit v1.2.1