diff options
author | dteske <dteske@FreeBSD.org> | 2015-09-11 21:08:46 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2015-09-11 21:08:46 +0000 |
commit | 619846e1ef5d3d5330e3ca6781648f48bbe59855 (patch) | |
tree | 9755a6a5b5a6adc0d05683aa9b938b1f76b9090c /usr.sbin/bsdinstall/scripts/netconfig_ipv6 | |
parent | b7553a37e9c84c16697e4195d2d5b31e355cdbf5 (diff) | |
download | FreeBSD-src-619846e1ef5d3d5330e3ca6781648f48bbe59855.zip FreeBSD-src-619846e1ef5d3d5330e3ca6781648f48bbe59855.tar.gz |
Produce meaningful exit code
MFC after: 3 days
X-MFC-to: stable/10
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/netconfig_ipv6')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index aa1a579..ff4258f 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -2,7 +2,7 @@ #- # Copyright (c) 2011 Nathan Whitehorn # Copyright (c) 2011 The FreeBSD Foundation -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Portions of this software were developed by Bjoern Zeeb @@ -141,16 +141,20 @@ BEGIN { } printf("ifconfig_%s_ipv6=\"inet6 %s\"\n", iface, $1); }' >> $BSDINSTALL_TMPETC/._rc.conf.net +retval=$? -if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` - if [ -n "${ipv6_defaultrouter}" ]; then + if [ "$ipv6_defaultrouter" ]; then route delete -inet6 default route add -inet6 default ${ipv6_defaultrouter} + retval=$? fi fi +exit $retval + ################################################################################ # END ################################################################################ |