rcconf.subr (251242) | rcconf.subr (251264) |
---|---|
1if [ ! "$_STARTUP_RCCONF_SUBR" ]; then _STARTUP_RCCONF_SUBR=1 2# 3# Copyright (c) 2006-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# | 1if [ ! "$_STARTUP_RCCONF_SUBR" ]; then _STARTUP_RCCONF_SUBR=1 2# 3# Copyright (c) 2006-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/share/rcconf.subr 251242 2013-06-02 05:45:25Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/startup/share/rcconf.subr 251264 2013-06-02 20:02:50Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." startup/rcconf.subr 34f_include $BSDCFG_SHARE/sysrc.subr 35 --- 232 unchanged lines hidden (view full) --- 268# 269# Each variable is treated as a boolean (NULL for false, non-NULL for true). 270# 271# Variables are exported for later-required awk(1) ENVIRON visibility. Returns 272# success unless the user chose `Cancel' or pressed Escape. 273# 274f_dialog_input_view_details() 275{ | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." startup/rcconf.subr 34f_include $BSDCFG_SHARE/sysrc.subr 35 --- 232 unchanged lines hidden (view full) --- 268# 269# Each variable is treated as a boolean (NULL for false, non-NULL for true). 270# 271# Variables are exported for later-required awk(1) ENVIRON visibility. Returns 272# success unless the user chose `Cancel' or pressed Escape. 273# 274f_dialog_input_view_details() 275{ |
276 local menu_list | 276 local prompt= 277 local menu_list # calculated below 278 local defaultitem= # calculated below |
277 local hline="$hline_arrows_tab_enter" | 279 local hline="$hline_arrows_tab_enter" |
278 local prompt="" | |
279 280 local md=" " 281 if [ "$SHOW_DESC" ]; then 282 md="X" 283 fi | 280 281 local md=" " 282 if [ "$SHOW_DESC" ]; then 283 md="X" 284 fi |
284 local m1=" " m2=" " m3=" " defaultitem= | 285 local m1=" " m2=" " m3=" " |
285 if [ "$SHOW_VALUE" ]; then 286 m1="*" 287 defaultitem="1 ($m1) $msg_show_value" 288 elif [ "$SHOW_DEFAULT_VALUE" ]; then 289 m2="*" 290 defaultitem="2 ($m2) $msg_show_default_value" 291 elif [ "$SHOW_CONFIGURED" ]; then 292 m3="*" --- 69 unchanged lines hidden (view full) --- 362# 363# Presents a menu of rc.conf(5) defaults (with, or without descriptions). This 364# function should be treated like a call to dialog(1) (the exit status should 365# be captured and f_dialog_menutag_fetch() should be used to get the user's 366# response). 367# 368f_dialog_input_rclist() 369{ | 286 if [ "$SHOW_VALUE" ]; then 287 m1="*" 288 defaultitem="1 ($m1) $msg_show_value" 289 elif [ "$SHOW_DEFAULT_VALUE" ]; then 290 m2="*" 291 defaultitem="2 ($m2) $msg_show_default_value" 292 elif [ "$SHOW_CONFIGURED" ]; then 293 m3="*" --- 69 unchanged lines hidden (view full) --- 363# 364# Presents a menu of rc.conf(5) defaults (with, or without descriptions). This 365# function should be treated like a call to dialog(1) (the exit status should 366# be captured and f_dialog_menutag_fetch() should be used to get the user's 367# response). 368# 369f_dialog_input_rclist() 370{ |
370 local hline="$hline_arrows_tab_enter" | |
371 local prompt="$msg_please_select_an_rcconf_directive" | 371 local prompt="$msg_please_select_an_rcconf_directive" |
372 local menu_list 373 374 menu_list=" | 372 local menu_list=" |
375 'X $msg_exit' '' ${SHOW_DESC:+'$msg_exit_help'} 376 " # END-QUOTE | 373 'X $msg_exit' '' ${SHOW_DESC:+'$msg_exit_help'} 374 " # END-QUOTE |
375 local hline="$hline_arrows_tab_enter" |
|
377 378 if [ ! "$_RCCONF_MAP" ]; then 379 # Generate RCCONF_MAP of `var desc ...' per-line 380 f_dialog_info "$msg_creating_rcconf_map" 381 RCCONF_MAP=$( f_startup_rcconf_map ) 382 export RCCONF_MAP 383 # Generate _${var}_desc variables from $RCCONF_MAP 384 f_startup_rcconf_map_expand --- 102 unchanged lines hidden --- | 376 377 if [ ! "$_RCCONF_MAP" ]; then 378 # Generate RCCONF_MAP of `var desc ...' per-line 379 f_dialog_info "$msg_creating_rcconf_map" 380 RCCONF_MAP=$( f_startup_rcconf_map ) 381 export RCCONF_MAP 382 # Generate _${var}_desc variables from $RCCONF_MAP 383 f_startup_rcconf_map_expand --- 102 unchanged lines hidden --- |