The err routine requires two arguments: an exit value and a string.

Additionaly, it will exit the script so an return statements after
calling it are superflous.
This commit is contained in:
Mike Makonnen 2004-05-20 14:16:05 +00:00
parent 2de4e6d27a
commit 63d260104a
2 changed files with 3 additions and 4 deletions

View File

@ -37,8 +37,7 @@ dhclient_common()
if [ -n "$_cmdifn" ]; then
eval _cooked_list=\"`expr "$dhcp_list" : ".*\($_cmdifn\).*"`\"
if [ -z "$_cooked_list" ]; then
err "No such network interface: $_cmdifn"
return 1
err 1 "No such network interface: $_cmdifn"
fi
fi
}

View File

@ -85,7 +85,7 @@ network_common()
_verbose=
if [ -z "$1" ]; then
err "network_common(): No function name specified."
err 1 "network_common(): No function name specified."
else
_func="$1"
fi
@ -100,7 +100,7 @@ network_common()
if [ -n "$_cmdifn" ]; then
eval _cooked_list=\"`expr "$_ifn_list" : ".*\($_cmdifn\).*"`\"
if [ -z "$_cooked_list" ]; then
err "No such network interface: $_cmdifn"
err 1 "No such network interface: $_cmdifn"
return 1
fi
fi