summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/netconfig_ipv6
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-06-02 14:25:27 +0000
committerbz <bz@FreeBSD.org>2011-06-02 14:25:27 +0000
commit6bfe728b8a801ef9b10237191abd76c6267a797c (patch)
tree78dcc79bb6907d5adea2aeff3eb5a6d6d7cec0b4 /usr.sbin/bsdinstall/scripts/netconfig_ipv6
parent04c4ecf8806ec0ea1e044eef7ffd0daa9a6912f4 (diff)
downloadFreeBSD-src-6bfe728b8a801ef9b10237191abd76c6267a797c.zip
FreeBSD-src-6bfe728b8a801ef9b10237191abd76c6267a797c.tar.gz
Write the multi step netconfig to a temporary file and only move that
to the final name if netconfig was completely finished. This fixes reentrance problems even better than r222611. Suggested by: nwhitehorn Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/netconfig_ipv6')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/netconfig_ipv66
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6
index c9fad54..70bd203 100755
--- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6
+++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6
@@ -69,7 +69,7 @@ while : ; do
continue
fi
fi
- echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/rc.conf.net
+ echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net
exit 0
else
break
@@ -138,10 +138,10 @@ BEGIN {
sub("$", "/64", $1);
}
printf("ifconfig_%s_ipv6=\"inet6 %s\"\n", iface, $1);
-}' >> $BSDINSTALL_TMPETC/rc.conf.net
+}' >> $BSDINSTALL_TMPETC/._rc.conf.net
if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
- . $BSDINSTALL_TMPETC/rc.conf.net
+ . $BSDINSTALL_TMPETC/._rc.conf.net
ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6`
route delete default
route add default ${ipv6_defaultrouter}
OpenPOWER on IntegriCloud