Deleted Added
full compact
tcpip.subr (251242) tcpip.subr (251268)
1if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MEDIA_TCPIP_SUBR=1
2#
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MEDIA_TCPIP_SUBR=1
2#
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/share/media/tcpip.subr 251242 2013-06-02 05:45:25Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/media/tcpip.subr 251268 2013-06-02 22:54:36Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." media/tcpip.subr
34f_include $BSDCFG_SHARE/struct.subr
35f_include $BSDCFG_SHARE/device.subr

--- 1092 unchanged lines hidden (view full) ---

1128
1129 #
1130 # Try a RTSOL scan if such behavior is desired.
1131 # If the variable was configured and is YES, do it.
1132 # If it was configured to anything else, treat it as NO.
1133 # Otherwise, ask the question interactively.
1134 #
1135 local try6
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." media/tcpip.subr
34f_include $BSDCFG_SHARE/struct.subr
35f_include $BSDCFG_SHARE/device.subr

--- 1092 unchanged lines hidden (view full) ---

1128
1129 #
1130 # Try a RTSOL scan if such behavior is desired.
1131 # If the variable was configured and is YES, do it.
1132 # If it was configured to anything else, treat it as NO.
1133 # Otherwise, ask the question interactively.
1134 #
1135 local try6
1136 if ! f_quietly f_getvar $VAR_NO_INET6 && {
1136 if ! f_isset $VAR_NO_INET6 && {
1137 { f_getvar $VAR_TRY_RTSOL try6 && [ "$try6" = "YES" ]; } ||
1138 {
1137 { f_getvar $VAR_TRY_RTSOL try6 && [ "$try6" = "YES" ]; } ||
1138 {
1139 ! f_quietly f_getvar $VAR_TRY_RTSOL &&
1140 f_dialog_noyes "$msg_try_ipv6_configuration"
1139 # Only prompt the user when VAR_TRY_RTSOL is unset
1140 ! f_isset $VAR_TRY_RTSOL &&
1141 f_dialog_noyes "$msg_try_ipv6_configuration"
1141 }
1142 }; then
1143 local i
1144
1145 f_quietly sysctl net.inet6.ip6.forwarding=0
1146 f_quietly sysctl net.inet6.ip6.accept_rtadv=1
1147 f_quietly ifconfig $dev up
1148

--- 15 unchanged lines hidden (view full) ---

1164 #
1165 # Try a DHCP scan if such behavior is desired.
1166 # If the variable was configured and is YES, do it.
1167 # If it was configured to anything else, treat it as NO.
1168 # Otherwise, ask the question interactively.
1169 #
1170 local try4
1171 if { f_getvar $VAR_TRY_DHCP try4 && [ "$try4" = "YES" ]; } || {
1142 }
1143 }; then
1144 local i
1145
1146 f_quietly sysctl net.inet6.ip6.forwarding=0
1147 f_quietly sysctl net.inet6.ip6.accept_rtadv=1
1148 f_quietly ifconfig $dev up
1149

--- 15 unchanged lines hidden (view full) ---

1165 #
1166 # Try a DHCP scan if such behavior is desired.
1167 # If the variable was configured and is YES, do it.
1168 # If it was configured to anything else, treat it as NO.
1169 # Otherwise, ask the question interactively.
1170 #
1171 local try4
1172 if { f_getvar $VAR_TRY_DHCP try4 && [ "$try4" = "YES" ]; } || {
1172 ! f_quietly f_getvar $VAR_TRY_DHCP &&
1173 f_dialog_noyes "$msg_try_dhcp_configuration"
1173 # Only prompt the user when VAR_TRY_DHCP is unset
1174 ! f_isset $VAR_TRY_DHCP &&
1175 f_dialog_noyes "$msg_try_dhcp_configuration"
1174 }; then
1175 f_quietly ifconfig $dev delete
1176 f_quietly mkdir -p /var/db
1177 f_quietly mkdir -p /var/run
1178 f_quietly mkdir -p /tmp
1179
1180 local msg="$msg_scanning_for_dhcp_servers"
1181 trap - SIGINT

--- 502 unchanged lines hidden ---
1176 }; then
1177 f_quietly ifconfig $dev delete
1178 f_quietly mkdir -p /var/db
1179 f_quietly mkdir -p /var/run
1180 f_quietly mkdir -p /tmp
1181
1182 local msg="$msg_scanning_for_dhcp_servers"
1183 trap - SIGINT

--- 502 unchanged lines hidden ---