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 250323 2013-05-07 05:40:20Z 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 size 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 size=$( eval f_dialog_menu_with_help_size \
204 \"\$title\" \
205 \"\$btitle\" \
206 \"\$prompt\" \
207 \"\$hline\" \
208 $menu_list )
209
210 local dialog_menu
211
212 dialog_menu=$( eval $DIALOG \
213 --title \"\$title\" \
214 --backtitle \"\$btitle\" \
215 --hline \"\$hline\" \
216 --item-help \
217 --ok-label \"\$msg_ok\" \
218 --cancel-label \"\$msg_done\" \
219 --help-button \
220 --help-label \"\$msg_help\" \
221 --default-item \"\$defaultitem\" \
222 ${USE_XDIALOG:+--help \"\"} \
223 --menu \"\$prompt\" $size $menu_list \
224 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
225 )
226 local retval=$?
227 setvar DIALOG_MENU_$$ "$dialog_menu"
228 defaultitem="$dialog_menu"
229
230 local mtag
231 mtag=$( f_dialog_menutag )
--- 104 unchanged lines hidden ---
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 250323 2013-05-07 05:40:20Z 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 size 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 size=$( eval f_dialog_menu_with_help_size \
204 \"\$title\" \
205 \"\$btitle\" \
206 \"\$prompt\" \
207 \"\$hline\" \
208 $menu_list )
209
210 local dialog_menu
211
212 dialog_menu=$( eval $DIALOG \
213 --title \"\$title\" \
214 --backtitle \"\$btitle\" \
215 --hline \"\$hline\" \
216 --item-help \
217 --ok-label \"\$msg_ok\" \
218 --cancel-label \"\$msg_done\" \
219 --help-button \
220 --help-label \"\$msg_help\" \
221 --default-item \"\$defaultitem\" \
222 ${USE_XDIALOG:+--help \"\"} \
223 --menu \"\$prompt\" $size $menu_list \
224 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
225 )
226 local retval=$?
227 setvar DIALOG_MENU_$$ "$dialog_menu"
228 defaultitem="$dialog_menu"
229
230 local mtag
231 mtag=$( f_dialog_menutag )
--- 104 unchanged lines hidden ---