aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-06-21 18:10:54 +0000
committerBill Nottingham <notting@redhat.com>2001-06-21 18:10:54 +0000
commit024a680e4b82206091614b94edaf90ede82936a9 (patch)
tree659c287755ae2300431c9fa1615fe11d77a4f34c
parentb4427f704b0b207c1a312107d396cfab8afc70d5 (diff)
downloadinitscripts-024a680e4b82206091614b94edaf90ede82936a9.tar
initscripts-024a680e4b82206091614b94edaf90ede82936a9.tar.gz
initscripts-024a680e4b82206091614b94edaf90ede82936a9.tar.bz2
initscripts-024a680e4b82206091614b94edaf90ede82936a9.tar.xz
initscripts-024a680e4b82206091614b94edaf90ede82936a9.zip
fix iwconfig return code return, and switch check_link_down returns to make ifup work (#45364)
-rw-r--r--sysconfig/network-scripts/network-functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 3dbe4b96..0400e69f 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -86,11 +86,11 @@ check_link_down ()
if [ -x /sbin/mii-tool ]; then
output=`/sbin/mii-tool $1 2>&1`
if echo $output | grep -q "Operation not supported"; then
- return 0
+ return 1
elif echo $output | grep -q "link ok"; then
- return 0
- else
return 1
+ else
+ return 0
fi
fi
return 0
@@ -99,7 +99,6 @@ check_link_down ()
check_default_route ()
{
ip route | grep -q default
- return $?
}
find_gateway_dev ()
@@ -135,7 +134,8 @@ add_default_route ()
is_wireless_device ()
{
if [ -x /sbin/iwconfig ]; then
- return iwconfig $1 | grep -q -v "no wireless extensions"
+ iwconfig $1 2>&1 | grep -q -v "no wireless extensions"
+ return $?
else
return 1
fi