! ! Fix two problems: ! 1) if no default gateway is given the route command will fail ! and the script will abort with an error leading to an endless ! loop. [1] ! 2) In the IPv6 case add -inet6 to not alter the legacy IP default ! route. ! ! Reported by: Oleg Ginzburg (olevole olevole.ru) [1] ! Tested by: Oleg Ginzburg (olevole olevole.ru) [1] ! Approved by: ! Index: bsdinstall/scripts/netconfig_ipv6 =================================================================== --- bsdinstall/scripts/netconfig_ipv6 (revision 225206) +++ bsdinstall/scripts/netconfig_ipv6 (working copy) @@ -142,7 +142,9 @@ BEGIN { if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` - route delete default - route add default ${ipv6_defaultrouter} + if [ -n "${ipv6_defaultrouter}" ]; then + route delete -inet6 default + route add -inet6 default ${ipv6_defaultrouter} + fi fi Index: bsdinstall/scripts/netconfig_ipv4 =================================================================== --- bsdinstall/scripts/netconfig_ipv4 (revision 225206) +++ bsdinstall/scripts/netconfig_ipv4 (working copy) @@ -79,7 +79,9 @@ echo $INTERFACE $IF_CONFIG | if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` - route delete -inet default - route add -inet default $defaultrouter + if [ -n "${defaultrouter}" ]; then + route delete -inet default + route add -inet default $defaultrouter + fi fi