From a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 2 Jul 2009 14:43:52 -0400 Subject: Don't use mii-tool for link status; only use ethtool. Essentially a consequence of bug #491358. --- sysconfig/network-scripts/network-functions | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index c25deef4..7d5053e9 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -254,14 +254,6 @@ check_device_down () fi } -check_mii_tool () -{ - [ -x /sbin/mii-tool ] || return 2 - output=`LC_ALL=C mii-tool $1 2>&1` - echo $output | LC_ALL=C grep -q "link ok" && return 1 - echo $output | LC_ALL=C grep -q "no link" && return 0 || return 2 -} - check_ethtool () { [ -x /sbin/ethtool ] || return 2 @@ -273,7 +265,7 @@ check_ethtool () check_link_down () { - if [ -x /sbin/mii-tool -o -x /sbin/ethtool ]; then + if [ -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 fi @@ -281,14 +273,12 @@ check_link_down () delay=10 [ -n "$LINKDELAY" ] && delay=$(($LINKDELAY * 2)) while [ $timeout -le $delay ]; do - check_mii_tool $1 - m=$? check_ethtool $1 e=$? - if [ $m -eq 1 ] || [ $e -eq 1 ] ; then + if [ $e -eq 1 ] ; then return 1 fi - if [ $m -eq 2 ] && [ $e -eq 2 ] ; then + if [ $e -eq 2 ] ; then return 1 fi usleep 500000 -- cgit v1.2.1