From cbac4adce6deb0e3df2801144418dd8c8024a3be Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 7 Jun 2005 23:59:45 +0000 Subject: [PATCH] Fix return values of ifconfig_up/down. Reported by: Andrea Campi --- etc/network.subr | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/etc/network.subr b/etc/network.subr index a3059dd8e3ea..dbceb56b1db0 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -57,7 +57,7 @@ ifconfig_up() _cfg=0 fi - return ${cfg} + return $_cfg } # ifconfig_down if @@ -69,7 +69,7 @@ ifconfig_down() { [ -z "$1" ] && return 1 _ifs="^" - _ret=1 + _cfg=1 inetList="`ifconfig $1 | grep 'inet ' | tr "\n" "$_ifs"`" @@ -84,12 +84,13 @@ ifconfig_down() IFS="$oldifs" ifconfig $1 ${_inet} delete IFS="$_ifs" - _ret=0 + _cfg=0 done IFS="$oldifs" if wpaif $1; then #/etc/rc.d/wpa_supplicant stop $1 + _cfg=0 fi if dhcpif $1; then @@ -97,7 +98,7 @@ ifconfig_down() _cfg=0 fi - return $_ret + return $_cfg } # _ifconfig_getargs if