aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-07-02 14:43:52 -0400
committerBill Nottingham <notting@redhat.com>2009-07-02 14:43:52 -0400
commita1460db13758eb3d9f3a512a4b20cc4c91eb4d8e (patch)
tree7433968b9520395b67298b93dbd10c0f4494087d /sysconfig/network-scripts/network-functions
parent298d777e897ad18c77746fa589d1b0694196de18 (diff)
downloadinitscripts-a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e.tar
initscripts-a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e.tar.gz
initscripts-a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e.tar.bz2
initscripts-a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e.tar.xz
initscripts-a1460db13758eb3d9f3a512a4b20cc4c91eb4d8e.zip
Don't use mii-tool for link status; only use ethtool.
Essentially a consequence of bug #491358.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-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