1if [ ! "$_MEDIA_OPTIONS_SUBR" ]; then _MEDIA_OPTIONS_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/options.subr 249751 2013-04-22 05:52:06Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." media/options.subr 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/struct.subr --- 25 unchanged lines hidden (view full) --- 61 # A hack so that the dialogs below are always interactive in a script 62 # 63 local old_interactive= 64 if ! f_interactive; then 65 f_getvar $VAR_NONINTERACTIVE old_interactive 66 unset $VAR_NONINTERACTIVE 67 fi 68 |
69 local defaultitem= |
70 while :; do 71 menu_list="" 72 73 f_getvar $VAR_NFS_SECURE cp 74 if [ "$cp" = "YES" ]; then menu_list="$menu_list 75 ' $msg_nfs_secure' 'YES' 76 '$msg_nfs_server_talks_only_on_a_secure_port'" 77 else menu_list="$menu_list --- 121 unchanged lines hidden (view full) --- 199 --title \"\$title\" \ 200 --backtitle \"\$btitle\" \ 201 --hline \"\$hline\" \ 202 --item-help \ 203 --ok-label \"\$msg_ok\" \ 204 --cancel-label \"\$msg_done\" \ 205 --help-button \ 206 --help-label \"\$msg_help\" \ |
207 --default-item \"\$defaultitem\" \ |
208 ${USE_XDIALOG:+--help \"\"} \ 209 --menu \"\$prompt\" $size $menu_list \ 210 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 211 ) 212 local retval=$? 213 setvar DIALOG_MENU_$$ "$dialog_menu" |
214 defaultitem="$dialog_menu" |
215 216 local mtag 217 mtag=$( f_dialog_menutag ) 218 f_dprintf "retval=%s mtag=[%s]" $retval "$mtag" 219 220 if [ $retval -eq 2 ]; then 221 # The Help button was pressed 222 f_show_help "$OPTIONS_HELPFILE" --- 89 unchanged lines hidden --- |