diff options
Diffstat (limited to 'usr.sbin/bsdconfig/networking/share/routing.subr')
-rw-r--r-- | usr.sbin/bsdconfig/networking/share/routing.subr | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/usr.sbin/bsdconfig/networking/share/routing.subr b/usr.sbin/bsdconfig/networking/share/routing.subr index b8ccdcd..3990c03 100644 --- a/usr.sbin/bsdconfig/networking/share/routing.subr +++ b/usr.sbin/bsdconfig/networking/share/routing.subr @@ -30,6 +30,7 @@ if [ ! "$_NETWORKING_ROUTING_SUBR" ]; then _NETWORKING_ROUTING_SUBR=1 BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." networking/routing.subr f_include $BSDCFG_SHARE/sysrc.subr f_include $BSDCFG_SHARE/dialog.subr f_include $BSDCFG_SHARE/networking/common.subr @@ -91,41 +92,20 @@ f_dialog_input_defaultrouter() if f_nfs_mounted && ! f_jailed; then local setting="$( printf "$msg_current_default_router" \ "$defaultrouter" )" - local message="$( printf "$msg_nfs_mounts_may_cause_hang" \ - "$setting" )" - f_dialog_msgbox "$message" + f_show_msg "$msg_nfs_mounts_may_cause_hang" "$setting" return $FAILURE fi - local msg="$msg_please_enter_default_router" - local hline="$hline_num_punc_tab_enter" - local size="$( f_dialog_inputbox_size \ - "$DIALOG_TITLE" \ - "$DIALOG_BACKTITLE" \ - "$msg" \ - "$defaultrouter" \ - "$hline" )" - # # Loop until the user provides taint-free input. # + local retval while :; do - local dialog_inputbox - dialog_inputbox=$( eval $DIALOG \ - --title \"\$DIALOG_TITLE\" \ - --backtitle \"\$DIALOG_BACKTITLE\" \ - --hline \"\$hline\" \ - --ok-label \"\$msg_ok\" \ - --cancel-label \"\$msg_cancel\" \ - --inputbox \"\$msg\" $size \ - \"\$defaultrouter\" \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + defaultrouter=$( f_dialog_input \ + "$msg_please_enter_default_router" \ + "$defaultrouter" "$hline_num_punc_tab_enter" ) - - local retval=$? - setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" - defaultrouter=$( f_dialog_inputstr ) - + retval=$? [ "$defaultrouter" ] || return $SUCCESS [ $retval -eq $SUCCESS ] || return $retval @@ -168,4 +148,8 @@ f_dialog_input_defaultrouter() fi } +############################################################ MAIN + +f_dprintf "%s: Successfully loaded." networking/routing.subr + fi # ! $_NETWORKING_ROUTING_SUBR |