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 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..." media/options.subr 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/struct.subr --- 14 unchanged lines hidden (view full) --- 50# 51f_media_options_menu() 52{ 53 f_dialog_title "$msg_options_editor" 54 local title="$DIALOG_TITLE" btitle="$DIALOG_BACKTITLE" 55 f_dialog_title_restore 56 local prompt="" 57 local hline="$hline_arrows_tab_enter" |
58 local menu_list cp |
59 60 # 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 --- 128 unchanged lines hidden (view full) --- 195 196 menu_list="$menu_list 197 ' $msg_rescan_devices' '<*>' 198 '$msg_rerun_bsdconfig_initial_device_probe' 199 ' $msg_use_defaults' '[${msg_reset}]' 200 '$msg_reset_all_values_to_startup_defaults' 201 " # END-QUOTE 202 |
203 local height width rows 204 eval f_dialog_menu_with_help_size height width rows \ 205 \"\$title\" \ 206 \"\$btitle\" \ 207 \"\$prompt\" \ 208 \"\$hline\" \ 209 $menu_list |
210 211 local dialog_menu 212 213 dialog_menu=$( eval $DIALOG \ |
214 --title \"\$title\" \ 215 --backtitle \"\$btitle\" \ 216 --hline \"\$hline\" \ 217 --item-help \ 218 --ok-label \"\$msg_ok\" \ 219 --cancel-label \"\$msg_done\" \ 220 --help-button \ 221 --help-label \"\$msg_help\" \ 222 --default-item \"\$defaultitem\" \ 223 ${USE_XDIALOG:+--help \"\"} \ 224 --menu \"\$prompt\" \ 225 $height $width $rows \ 226 $menu_list \ |
227 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 228 ) 229 local retval=$? 230 setvar DIALOG_MENU_$$ "$dialog_menu" 231 defaultitem="$dialog_menu" 232 233 local mtag 234 mtag=$( f_dialog_menutag ) --- 104 unchanged lines hidden --- |