diff options
author | brooks <brooks@FreeBSD.org> | 2005-06-07 23:59:45 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-06-07 23:59:45 +0000 |
commit | dc7f878d880b3284f9b07122e630f2b08993daeb (patch) | |
tree | 5b8e6fca2f65f4df112808f171de30bf9b634b6e /etc | |
parent | 258fa861f272b1842f245624d18b64442de1a150 (diff) | |
download | FreeBSD-src-dc7f878d880b3284f9b07122e630f2b08993daeb.zip FreeBSD-src-dc7f878d880b3284f9b07122e630f2b08993daeb.tar.gz |
Fix return values of ifconfig_up/down.
Reported by: Andrea Campi
Diffstat (limited to 'etc')
-rw-r--r-- | etc/network.subr | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/network.subr b/etc/network.subr index a3059dd..dbceb56 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 |