Deleted Added
full compact
resolv.subr (251242) resolv.subr (251264)
1if [ ! "$_NETWORKING_RESOLV_SUBR" ]; then _NETWORKING_RESOLV_SUBR=1
2#
3# Copyright (c) 2006-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 [ ! "$_NETWORKING_RESOLV_SUBR" ]; then _NETWORKING_RESOLV_SUBR=1
2#
3# Copyright (c) 2006-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/networking/share/resolv.subr 251242 2013-06-02 05:45:25Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/networking/share/resolv.subr 251264 2013-06-02 20:02:50Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." networking/resolv.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/strings.subr

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

387}
388
389# f_dialog_menu_nameservers
390#
391# Edit the nameservers in resolv.conf(5).
392#
393f_dialog_menu_nameservers()
394{
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." networking/resolv.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/strings.subr

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

387}
388
389# f_dialog_menu_nameservers
390#
391# Edit the nameservers in resolv.conf(5).
392#
393f_dialog_menu_nameservers()
394{
395 local prompt="$msg_dns_configuration"
396 local menu_list # Calculated below
397 local hline="$hline_arrows_tab_enter"
398 local defaultitem=
395
396 local height width rows
397 local opt_exit="$msg_return_to_previous_menu"
398 local opt_add="$msg_add_nameserver"
399
400 local height width rows
401 local opt_exit="$msg_return_to_previous_menu"
402 local opt_add="$msg_add_nameserver"
399 local hline="$hline_arrows_tab_enter"
400 local prompt defaultitem=
401
402 #
403 # Loop forever until the user has finished configuring nameservers
404 #
403
404 #
405 # Loop forever until the user has finished configuring nameservers
406 #
405 prompt="$msg_dns_configuration"
406 while :; do
407 #
408 # Re/Build list of nameservers
409 #
410 local nameservers="$( f_resolv_conf_nameservers )"
407 while :; do
408 #
409 # Re/Build list of nameservers
410 #
411 local nameservers="$( f_resolv_conf_nameservers )"
411 local menu_list="$(
412 menu_list=$(
412 index=1
413
414 echo "'X $msg_exit' '$opt_exit'"
415 index=$(( $index + 1 ))
416
417 echo "'A $msg_add' '$opt_add'"
418 index=$(( $index + 1 ))
419
420 for ns in $nameservers; do
421 [ $index -lt ${#DIALOG_MENU_TAGS} ] || break
422 tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
423 echo "'$tag nameserver' '$ns'"
424 index=$(( $index + 1 ))
425 done
413 index=1
414
415 echo "'X $msg_exit' '$opt_exit'"
416 index=$(( $index + 1 ))
417
418 echo "'A $msg_add' '$opt_add'"
419 index=$(( $index + 1 ))
420
421 for ns in $nameservers; do
422 [ $index -lt ${#DIALOG_MENU_TAGS} ] || break
423 tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
424 echo "'$tag nameserver' '$ns'"
425 index=$(( $index + 1 ))
426 done
426 )"
427 )
427
428 #
429 # Display configuration-edit menu
430 #
431 eval f_dialog_menu_size height width rows \
432 \"\$DIALOG_TITLE\" \
433 \"\$DIALOG_BACKTITLE\" \
434 \"\$prompt\" \

--- 46 unchanged lines hidden ---
428
429 #
430 # Display configuration-edit menu
431 #
432 eval f_dialog_menu_size height width rows \
433 \"\$DIALOG_TITLE\" \
434 \"\$DIALOG_BACKTITLE\" \
435 \"\$prompt\" \

--- 46 unchanged lines hidden ---