netconfig_ipv6 (222502) | netconfig_ipv6 (222619) |
---|---|
1#!/bin/sh 2#- 3# Copyright (c) 2011 Nathan Whitehorn 4# All rights reserved. 5# Copyright (c) 2011 The FreeBSD Foundation 6# All rights reserved. 7# 8# Portions of this software were developed by Bjoern Zeeb --- 15 unchanged lines hidden (view full) --- 24# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30# SUCH DAMAGE. 31# | 1#!/bin/sh 2#- 3# Copyright (c) 2011 Nathan Whitehorn 4# All rights reserved. 5# Copyright (c) 2011 The FreeBSD Foundation 6# All rights reserved. 7# 8# Portions of this software were developed by Bjoern Zeeb --- 15 unchanged lines hidden (view full) --- 24# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30# SUCH DAMAGE. 31# |
32# $FreeBSD: head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 222502 2011-05-30 17:27:48Z bz $ | 32# $FreeBSD: head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 222619 2011-06-02 14:25:27Z bz $ |
33 34# 35# TODO: 36# - Add -R /sbin/resolvconf to rtsol once support is in tree. 37# - Add DHCPv6 support once FreeBSD ships with it. 38# 39 40: ${DIALOG_OK=0} --- 23 unchanged lines hidden (view full) --- 64 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up 65 rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG 66 if [ $? -ne 0 ]; then 67 dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 68 AGAIN=" again" 69 continue 70 fi 71 fi | 33 34# 35# TODO: 36# - Add -R /sbin/resolvconf to rtsol once support is in tree. 37# - Add DHCPv6 support once FreeBSD ships with it. 38# 39 40: ${DIALOG_OK=0} --- 23 unchanged lines hidden (view full) --- 64 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up 65 rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG 66 if [ $? -ne 0 ]; then 67 dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 68 AGAIN=" again" 69 continue 70 fi 71 fi |
72 echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/rc.conf.net | 72 echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net |
73 exit 0 74 else 75 break 76 fi 77done 78 79ROUTER6=`netstat -Wrn -f inet6 | awk '/default/ {printf("%s\n", $2);}'` 80ADDRS=`ifconfig ${INTERFACE} inet6 | \ --- 52 unchanged lines hidden (view full) --- 133 # Ignore all but the first IP address for now. 134 next; 135 } 136 count++; 137 if (!match($1, "/")) { 138 sub("$", "/64", $1); 139 } 140 printf("ifconfig_%s_ipv6=\"inet6 %s\"\n", iface, $1); | 73 exit 0 74 else 75 break 76 fi 77done 78 79ROUTER6=`netstat -Wrn -f inet6 | awk '/default/ {printf("%s\n", $2);}'` 80ADDRS=`ifconfig ${INTERFACE} inet6 | \ --- 52 unchanged lines hidden (view full) --- 133 # Ignore all but the first IP address for now. 134 next; 135 } 136 count++; 137 if (!match($1, "/")) { 138 sub("$", "/64", $1); 139 } 140 printf("ifconfig_%s_ipv6=\"inet6 %s\"\n", iface, $1); |
141}' >> $BSDINSTALL_TMPETC/rc.conf.net | 141}' >> $BSDINSTALL_TMPETC/._rc.conf.net |
142 143if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then | 142 143if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then |
144 . $BSDINSTALL_TMPETC/rc.conf.net | 144 . $BSDINSTALL_TMPETC/._rc.conf.net |
145 ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` 146 route delete default 147 route add default ${ipv6_defaultrouter} 148fi 149 | 145 ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` 146 route delete default 147 route add default ${ipv6_defaultrouter} 148fi 149 |