diff options
author | mtm <mtm@FreeBSD.org> | 2004-05-20 14:16:05 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2004-05-20 14:16:05 +0000 |
commit | 5d2866f12529550c960cda188799bc5cca069dfc (patch) | |
tree | a7e84d8ec528ed2eb77f02d481551ee230e7f19c /etc/rc.d | |
parent | 553013776a90a4809e915d11ff0d2c56c7efc385 (diff) | |
download | FreeBSD-src-5d2866f12529550c960cda188799bc5cca069dfc.zip FreeBSD-src-5d2866f12529550c960cda188799bc5cca069dfc.tar.gz |
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.
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-x | etc/rc.d/dhclient | 3 | ||||
-rw-r--r-- | etc/rc.d/netif | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/etc/rc.d/dhclient b/etc/rc.d/dhclient index 2a6e13d..dce8717 100755 --- a/etc/rc.d/dhclient +++ b/etc/rc.d/dhclient @@ -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 } diff --git a/etc/rc.d/netif b/etc/rc.d/netif index 42a35b0..38e4478 100644 --- a/etc/rc.d/netif +++ b/etc/rc.d/netif @@ -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 |