resolv.subr (249751) | resolv.subr (251190) |
---|---|
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 249751 2013-04-22 05:52:06Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/networking/share/resolv.subr 251190 2013-05-31 19:07:17Z 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 --- 352 unchanged lines hidden (view full) --- 388} 389 390# f_dialog_menu_nameservers 391# 392# Edit the nameservers in resolv.conf(5). 393# 394f_dialog_menu_nameservers() 395{ | 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 --- 352 unchanged lines hidden (view full) --- 388} 389 390# f_dialog_menu_nameservers 391# 392# Edit the nameservers in resolv.conf(5). 393# 394f_dialog_menu_nameservers() 395{ |
396 397 local height width rows |
|
396 local opt_exit="$msg_return_to_previous_menu" 397 local opt_add="$msg_add_nameserver" 398 local hline="$hline_arrows_tab_enter" | 398 local opt_exit="$msg_return_to_previous_menu" 399 local opt_add="$msg_add_nameserver" 400 local hline="$hline_arrows_tab_enter" |
399 local prompt size defaultitem= | 401 local prompt defaultitem= |
400 401 # 402 # Loop forever until the user has finished configuring nameservers 403 # 404 prompt="$msg_dns_configuration" 405 while :; do 406 # 407 # Re/Build list of nameservers --- 14 unchanged lines hidden (view full) --- 422 echo "'$tag nameserver' '$ns'" 423 index=$(( $index + 1 )) 424 done 425 )" 426 427 # 428 # Display configuration-edit menu 429 # | 402 403 # 404 # Loop forever until the user has finished configuring nameservers 405 # 406 prompt="$msg_dns_configuration" 407 while :; do 408 # 409 # Re/Build list of nameservers --- 14 unchanged lines hidden (view full) --- 424 echo "'$tag nameserver' '$ns'" 425 index=$(( $index + 1 )) 426 done 427 )" 428 429 # 430 # Display configuration-edit menu 431 # |
430 size=$( eval f_dialog_menu_size \ 431 \"\$DIALOG_TITLE\" \ 432 \"\$DIALOG_BACKTITLE\" \ 433 \"\$prompt\" \ 434 \"\$hline\" \ 435 $menu_list ) | 432 eval f_dialog_menu_size height width rows \ 433 \"\$DIALOG_TITLE\" \ 434 \"\$DIALOG_BACKTITLE\" \ 435 \"\$prompt\" \ 436 \"\$hline\" \ 437 $menu_list |
436 local dialog_menu 437 dialog_menu=$( eval $DIALOG \ 438 --title \"\$DIALOG_TITLE\" \ 439 --backtitle \"\$DIALOG_BACKTITLE\" \ 440 --hline \"\$hline\" \ 441 --ok-label \"\$msg_ok\" \ 442 --cancel-label \"\$msg_cancel\" \ 443 --default-item \"\$defaultitem\" \ | 438 local dialog_menu 439 dialog_menu=$( eval $DIALOG \ 440 --title \"\$DIALOG_TITLE\" \ 441 --backtitle \"\$DIALOG_BACKTITLE\" \ 442 --hline \"\$hline\" \ 443 --ok-label \"\$msg_ok\" \ 444 --cancel-label \"\$msg_cancel\" \ 445 --default-item \"\$defaultitem\" \ |
444 --menu \"\$prompt\" $size \ | 446 --menu \"\$prompt\" \ 447 $height $width $rows \ |
445 $menu_list \ 446 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 447 ) 448 449 local retval=$? 450 setvar DIALOG_MENU_$$ "$dialog_menu" 451 local tag="$( f_dialog_menutag )" ns="" 452 --- 27 unchanged lines hidden --- | 448 $menu_list \ 449 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 450 ) 451 452 local retval=$? 453 setvar DIALOG_MENU_$$ "$dialog_menu" 454 local tag="$( f_dialog_menutag )" ns="" 455 --- 27 unchanged lines hidden --- |