aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-07-25 22:00:00 +0000
committerBill Nottingham <notting@redhat.com>2001-07-25 22:00:00 +0000
commit6abd6c03b8f53a4961f57e223791bc8fa9881c6f (patch)
treefb22a2b13a4b739b4734e23d47eff411675554da
parent93abc83308aa2d8bce1c9d6c4cc3a462b4a262ce (diff)
downloadinitscripts-6abd6c03b8f53a4961f57e223791bc8fa9881c6f.tar
initscripts-6abd6c03b8f53a4961f57e223791bc8fa9881c6f.tar.gz
initscripts-6abd6c03b8f53a4961f57e223791bc8fa9881c6f.tar.bz2
initscripts-6abd6c03b8f53a4961f57e223791bc8fa9881c6f.tar.xz
initscripts-6abd6c03b8f53a4961f57e223791bc8fa9881c6f.zip
set link up before checking with mii-tool (#49949)
-rw-r--r--sysconfig/network-scripts/network-functions2
1 files changed, 2 insertions, 0 deletions
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