mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Improvements to whitespace and comments.
This commit is contained in:
parent
5b4765c331
commit
f4844f65a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251266
@ -169,7 +169,6 @@ dialog_menu_main()
|
||||
local hline=
|
||||
|
||||
local sanitize_awk="{ gsub(/'/, \"'\\\\''\"); print }"
|
||||
|
||||
local menuitem menu_title menu_help menu_selection index=2
|
||||
for menuitem in $( cd $BSDCFG_LIBE && ls -d [0-9][0-9][0-9].* ); do
|
||||
[ $index -lt ${#DIALOG_MENU_TAGS} ] || break
|
||||
|
@ -101,7 +101,9 @@ f_ifconfig_media()
|
||||
|
||||
# f_dialog_input_options $interface
|
||||
#
|
||||
# Input custom interface options.
|
||||
# Input custom interface options. If the user does not press ESC or choose
|
||||
# Cancel/No, $options will hold the user's input. Default input is taken from
|
||||
# the same variable ($options).
|
||||
#
|
||||
f_dialog_input_options()
|
||||
{
|
||||
|
@ -1672,7 +1672,7 @@ f_dialog_inputstr_fetch()
|
||||
#
|
||||
# Prompt the user with a dialog(1) inputbox to enter some value. The inputbox
|
||||
# remains until the the user presses ENTER or ESC, or otherwise ends the
|
||||
# editing session, by selecting `Cancel' for example.
|
||||
# editing session (by selecting `Cancel' for example).
|
||||
#
|
||||
# If the user presses ENTER, the exit status is zero (success), otherwise if
|
||||
# the user presses ESC the exit status is 255, or if the user chose Cancel, the
|
||||
|
@ -171,7 +171,8 @@ f_become_root_via_sudo()
|
||||
--cancel-label "$msg_cancel" \
|
||||
--password --inputbox "$prompt" \
|
||||
$height $width \
|
||||
2>&1 > /dev/null )
|
||||
2>&1 > /dev/null
|
||||
)
|
||||
retval=$?
|
||||
|
||||
# Catch X11-related errors
|
||||
|
@ -63,6 +63,7 @@ dialog_menu_main()
|
||||
local defaultitem= # Calculated below
|
||||
local hline="$hline_arrows_tab_enter"
|
||||
|
||||
# List of variables we'll need from rc.conf(5)
|
||||
local var_list="
|
||||
accounting_enable
|
||||
local_startup
|
||||
@ -75,6 +76,7 @@ dialog_menu_main()
|
||||
startup_dirs
|
||||
" # END-QUOTE
|
||||
|
||||
# Add i386-specific variables if appropriate
|
||||
if [ "$UNAME_P" = "i386" ]; then
|
||||
var_list="$var_list
|
||||
apm_enable
|
||||
|
@ -158,7 +158,9 @@ dialog_menu_main()
|
||||
}'
|
||||
)"
|
||||
|
||||
set -f # noglob
|
||||
set -f # set noglob because descriptions in the $menu_list may contain
|
||||
# `*' and get expanded by dialog(1) (doesn't affect Xdialog(1)).
|
||||
# This prevents dialog(1) from expanding wildcards in help line.
|
||||
|
||||
local height width rows
|
||||
eval f_dialog_menu${SHOW_DESC:+_with_help}_size \
|
||||
|
@ -194,7 +194,9 @@ dialog_menu_main()
|
||||
done
|
||||
menu_list="$menu_list $menu_buf"
|
||||
|
||||
set -f # noglob (descriptions in $RCCONF_MENU_LIST may contain *)
|
||||
set -f # set noglob because descriptions in the $menu_list may contain
|
||||
# `*' and get expanded by dialog(1) (doesn't affect Xdialog(1)).
|
||||
# This prevents dialog(1) from expanding wildcards in help line.
|
||||
|
||||
local height width rows
|
||||
eval f_dialog_menu${SHOW_DESC:+_with_help}_size \
|
||||
@ -249,11 +251,14 @@ dialog_menu_confirm_delete()
|
||||
|
||||
[ $# -ge 1 ] || return $FAILURE
|
||||
|
||||
# If asked to delete only one variable, simply ask and return
|
||||
if [ $# -eq 1 ]; then
|
||||
f_noyes "$msg_are_you_sure_you_want_to_delete" "$delete_vars"
|
||||
return $?
|
||||
fi
|
||||
# Not reached unless requested to delete multiple variables
|
||||
|
||||
# Generate a menu to cleanly display the variables to be deleted
|
||||
local var_list
|
||||
var_list=$( for var in $*; do echo "$var"; done | sort -u )
|
||||
menu_list=$(
|
||||
|
@ -69,6 +69,8 @@ dialog_menu_main()
|
||||
local hline="$hline_arrows_tab_enter"
|
||||
local defaultitem= # Calculated below
|
||||
|
||||
# NOTE: Using a GLOBAL here because caller will need this list to turn
|
||||
# the menu tag into the menu item with f_dialog_menutag2item()
|
||||
RCVAR_MENU_LIST="
|
||||
'X $msg_exit' '$msg_exit_this_menu'
|
||||
${SHOW_DESC:+'$msg_exit_this_menu'}
|
||||
@ -124,7 +126,9 @@ dialog_menu_main()
|
||||
}'
|
||||
)"
|
||||
|
||||
set -f # noglob
|
||||
set -f # set noglob because descriptions in the $RCVAR_MENU_LIST may
|
||||
# contain `*' and get expanded by dialog(1). This prevents
|
||||
# dialog(1) from expanding wildcards in the help line.
|
||||
|
||||
local height width rows
|
||||
eval f_dialog_menu${SHOW_DESC:+_with_help}_size \
|
||||
|
@ -278,6 +278,7 @@ f_dialog_input_view_details()
|
||||
local defaultitem= # calculated below
|
||||
local hline="$hline_arrows_tab_enter"
|
||||
|
||||
# Calculate marks for checkboxes and radio buttons
|
||||
local md=" "
|
||||
if [ "$SHOW_DESC" ]; then
|
||||
md="X"
|
||||
@ -294,6 +295,7 @@ f_dialog_input_view_details()
|
||||
defaultitem="3 ($m3) $msg_show_configured"
|
||||
fi
|
||||
|
||||
# Create the menu list with the above-calculated marks
|
||||
menu_list="
|
||||
'R $msg_reset' '$msg_reset_desc'
|
||||
'D [$md] $msg_desc' '$msg_desc_desc'
|
||||
@ -410,7 +412,9 @@ f_dialog_input_rclist()
|
||||
}'
|
||||
)"
|
||||
|
||||
set -f # noglob
|
||||
set -f # set noglob because descriptions in the $menu_list may contain
|
||||
# `*' and get expanded by dialog(1) (doesn't affect Xdialog(1)).
|
||||
# This prevents dialog(1) from expanding wildcards in help line.
|
||||
|
||||
local height width rows
|
||||
eval f_dialog_menu${SHOW_DESC:+_with_help}_size \
|
||||
|
@ -280,9 +280,9 @@ f_dialog_input_group_gid()
|
||||
|
||||
# f_dialog_input_group_members [$group_members]
|
||||
#
|
||||
# Allow the user to modify a list of members for a given group. If the user does
|
||||
# not cancel or press ESC, the $group_members variable will hold the newly-
|
||||
# configured value upon return.
|
||||
# Allow the user to modify a list of members for a given group. If the user
|
||||
# does not cancel or press ESC, the $group_members variable will hold the
|
||||
# newly-configured value upon return.
|
||||
#
|
||||
f_dialog_input_group_members()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user