diff --git a/usr.sbin/bsdconfig/share/sysrc.subr b/usr.sbin/bsdconfig/share/sysrc.subr index 80deaa8be6c..51aabcccad5 100644 --- a/usr.sbin/bsdconfig/share/sysrc.subr +++ b/usr.sbin/bsdconfig/share/sysrc.subr @@ -132,7 +132,7 @@ f_sysrc_get() # Clear the environment of all variables, preventing the # expansion of normals such as `PS1', `TERM', etc. # - f_clean_env --except RC_CONFS RC_DEFAULTS SUCCESS + f_clean_env --except RC_CONFS RC_DEFAULTS . "$RC_DEFAULTS" > /dev/null 2>&1 @@ -153,15 +153,11 @@ f_sysrc_get() # If RC_CONFS is defined, set $rc_conf_files to an explicit # value, modifying the default behavior of source_rc_confs(). # - ( : ${RC_CONFS?} ) > /dev/null 2>&1 - if [ $? -eq ${SUCCESS:-0} ]; then + if [ "${RC_CONFS+set}" ]; then rc_conf_files="$RC_CONFS" _rc_confs_set=1 fi - unset SUCCESS - # no longer needed - source_rc_confs > /dev/null 2>&1 # diff --git a/usr.sbin/bsdconfig/startup/rcadd b/usr.sbin/bsdconfig/startup/rcadd index d9d6a045353..8f28840bf45 100755 --- a/usr.sbin/bsdconfig/startup/rcadd +++ b/usr.sbin/bsdconfig/startup/rcadd @@ -46,7 +46,7 @@ ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) # Options # # Inherit SHOW_DESC value if set, otherwise default to 1 -( : ${SHOW_DESC?} ) > /dev/null 2>&1 || SHOW_DESC=1 +[ "${SHOW_DESC+set}" ] || SHOW_DESC=1 ############################################################ FUNCTIONS diff --git a/usr.sbin/bsdconfig/startup/rcconf b/usr.sbin/bsdconfig/startup/rcconf index 3f7c25049ea..4fb58593ebf 100755 --- a/usr.sbin/bsdconfig/startup/rcconf +++ b/usr.sbin/bsdconfig/startup/rcconf @@ -54,7 +54,7 @@ RCCONF_MENU_LIST= # Options # # Inherit SHOW_DESC value if set, otherwise default to 1 -( : ${SHOW_DESC?} ) > /dev/null 2>&1 || SHOW_DESC=1 +[ "${SHOW_DESC+set}" ] || SHOW_DESC=1 # Selectively inherit SHOW_* value (in order of preference) if [ "$SHOW_DEFAULT_VALUE" ]; then SHOW_DEFAULT_VALUE=1 diff --git a/usr.sbin/bsdconfig/startup/rcdelete b/usr.sbin/bsdconfig/startup/rcdelete index a97025838c0..b431d884b2e 100755 --- a/usr.sbin/bsdconfig/startup/rcdelete +++ b/usr.sbin/bsdconfig/startup/rcdelete @@ -54,7 +54,7 @@ RCCONF_MENU_LIST= # Options # # Inherit SHOW_DESC value if set, otherwise default to 1 -( : ${SHOW_DESC?} ) > /dev/null 2>&1 || SHOW_DESC=1 +[ "${SHOW_DESC+set}" ] || SHOW_DESC=1 # Selectively inherit SHOW_* value (in order of preference) if [ "$SHOW_DEFAULT_VALUE" ]; then SHOW_DEFAULT_VALUE=1 @@ -348,7 +348,7 @@ while :; do var="${mtag# }" # Toggle the state-variable and loop back to menu - if ( eval : \${_${var}_delete?} ) > /dev/null 2>&1; then + if eval [ \"\${_${var}_delete+set}\" ]; then unset _${var}_delete else setvar _${var}_delete 1 diff --git a/usr.sbin/bsdconfig/startup/rcvar b/usr.sbin/bsdconfig/startup/rcvar index 799dd3426b1..b7a52295ea1 100755 --- a/usr.sbin/bsdconfig/startup/rcvar +++ b/usr.sbin/bsdconfig/startup/rcvar @@ -54,7 +54,7 @@ RCVAR_MENU_LIST= # Options # # Inherit SHOW_DESC value if set, otherwise default to 1 -( ${SHOW_DESC?} ) > /dev/null 2>&1 || SHOW_DESC=1 +[ "${SHOW_DESC+set}" ] || SHOW_DESC=1 ############################################################ FUNCTIONS