misc (250633) | misc (251190) |
---|---|
1#!/bin/sh 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# | 1#!/bin/sh 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/startup/misc 250633 2013-05-14 03:21:13Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/startup/misc 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..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/mustberoot.subr --- 15 unchanged lines hidden (view full) --- 51############################################################ FUNCTIONS 52 53# dialog_menu_main 54# 55# Display the dialog(1)-based application main menu. 56# 57dialog_menu_main() 58{ | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/mustberoot.subr --- 15 unchanged lines hidden (view full) --- 51############################################################ FUNCTIONS 52 53# dialog_menu_main 54# 55# Display the dialog(1)-based application main menu. 56# 57dialog_menu_main() 58{ |
59 local menu_list var_list size defaultitem= | 59 local menu_list var_list defaultitem= |
60 local hline="$hline_arrows_tab_enter" 61 local prompt="$msg_miscellaneous_menu_text" 62 63 # Obtain default-item (adjusted below for dynamic tags) 64 f_getvar DEFAULTITEM_$$ defaultitem 65 local ditem="${defaultitem%%[$IFS]*}" 66 67 menu_list=" --- 192 unchanged lines hidden (view full) --- 260 261 printf "\"\n" 262 263 if ( defaultitem ) 264 printf "defaultitem=\"%s\"\n", defaultitem 265 }' 266 )" 267 | 60 local hline="$hline_arrows_tab_enter" 61 local prompt="$msg_miscellaneous_menu_text" 62 63 # Obtain default-item (adjusted below for dynamic tags) 64 f_getvar DEFAULTITEM_$$ defaultitem 65 local ditem="${defaultitem%%[$IFS]*}" 66 67 menu_list=" --- 192 unchanged lines hidden (view full) --- 260 261 printf "\"\n" 262 263 if ( defaultitem ) 264 printf "defaultitem=\"%s\"\n", defaultitem 265 }' 266 )" 267 |
268 size=$( eval f_dialog_menu_size \ 269 \"\$DIALOG_TITLE\" \ 270 \"\$DIALOG_BACKTITLE\" \ 271 \"\$prompt\" \ 272 \"\$hline\" \ 273 $menu_list ) | 268 local height width rows 269 eval f_dialog_menu_size height width rows \ 270 \"\$DIALOG_TITLE\" \ 271 \"\$DIALOG_BACKTITLE\" \ 272 \"\$prompt\" \ 273 \"\$hline\" \ 274 $menu_list |
274 275 local dialog_menu 276 dialog_menu=$( eval $DIALOG \ 277 --title \"\$DIALOG_TITLE\" \ 278 --backtitle \"\$DIALOG_BACKTITLE\" \ 279 --hline \"\$hline\" \ 280 --ok-label \"\$msg_ok\" \ 281 --cancel-label \"\$msg_cancel\" \ 282 --default-item \"\$defaultitem\" \ | 275 276 local dialog_menu 277 dialog_menu=$( eval $DIALOG \ 278 --title \"\$DIALOG_TITLE\" \ 279 --backtitle \"\$DIALOG_BACKTITLE\" \ 280 --hline \"\$hline\" \ 281 --ok-label \"\$msg_ok\" \ 282 --cancel-label \"\$msg_cancel\" \ 283 --default-item \"\$defaultitem\" \ |
283 --menu \"\$prompt\" $size \ | 284 --menu \"\$prompt\" \ 285 $height $width $rows \ |
284 $menu_list \ 285 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 286 ) 287 local retval=$? 288 setvar DEFAULTITEM_$$ "$dialog_menu" 289 setvar DIALOG_MENU_$$ "$dialog_menu" 290 return $retval 291} --- 143 unchanged lines hidden --- | 286 $menu_list \ 287 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 288 ) 289 local retval=$? 290 setvar DEFAULTITEM_$$ "$dialog_menu" 291 setvar DIALOG_MENU_$$ "$dialog_menu" 292 return $retval 293} --- 143 unchanged lines hidden --- |