aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysconfig/network-scripts/network-functions16
1 files changed, 3 insertions, 13 deletions
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