From 6abd6c03b8f53a4961f57e223791bc8fa9881c6f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Jul 2001 22:00:00 +0000 Subject: set link up before checking with mii-tool (#49949) --- sysconfig/network-scripts/network-functions | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysconfig/network-scripts/network-functions') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index ae661a31..f4d7a130 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -120,7 +120,9 @@ check_device_down () check_link_down () { if [ -x /sbin/mii-tool ]; then + ip link set $1 up >/dev/null 2>&1 output=`LC_ALL=C /sbin/mii-tool $1 2>&1` + ip link set $1 down >/dev/null 2>&1 if echo $output | grep -q "Operation not supported"; then return 1 elif echo $output | grep -q "link ok"; then -- cgit v1.2.1