Date: Mon, 2 Nov 2015 22:06:44 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290290 - stable/10/usr.sbin/bsdinstall/scripts Message-ID: <201511022206.tA2M6ivT076764@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Mon Nov 2 22:06:44 2015 New Revision: 290290 URL: https://svnweb.freebsd.org/changeset/base/290290 Log: MFC r287690: Produce meaningful exit code Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Nov 2 22:05:41 2015 (r290289) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Nov 2 22:06:44 2015 (r290290) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -80,16 +80,20 @@ echo $INTERFACE $IF_CONFIG | printf("ifconfig_%s=\"%s\inet %s netmask %s\"\n", $1, prefix, $2, $3); printf("defaultrouter=\"%s\"\n", $4); }' >> $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` - if [ -n "${defaultrouter}" ]; then + if [ "$defaultrouter" ]; then route delete -inet default route add -inet default $defaultrouter + retval=$? fi fi +exit $retval + ################################################################################ # END ################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Nov 2 22:05:41 2015 (r290289) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Nov 2 22:06:44 2015 (r290290) @@ -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 ################################################################################
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511022206.tA2M6ivT076764>