resolv.subr (ec7120b5b2d110c16e43de0e66e7f971efd52717) resolv.subr (052f89691c59e17ffd322a793a3d298e66f51278)
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:

--- 378 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{
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:

--- 378 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 ---