summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/share/sysrc.subr
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2012-09-22 04:04:02 +0000
committerdteske <dteske@FreeBSD.org>2012-09-22 04:04:02 +0000
commita74ee85809555d43ba3be70a6f33a037fc22d53e (patch)
tree375d9c5184db5178dff9a7ac6c97c23ecb5cb73d /usr.sbin/bsdconfig/share/sysrc.subr
parent0552e7d2c38b816d8d506944d5f258ae1b5cd38d (diff)
downloadFreeBSD-src-a74ee85809555d43ba3be70a6f33a037fc22d53e.zip
FreeBSD-src-a74ee85809555d43ba3be70a6f33a037fc22d53e.tar.gz
Replace "( : ${var?} )" syntax with better "[ ${var+set} ]" syntax.
Reviewed by: jilles, adrian (co-mentor) Approved by: jilles, adrian (co-mentor)
Diffstat (limited to 'usr.sbin/bsdconfig/share/sysrc.subr')
-rw-r--r--usr.sbin/bsdconfig/share/sysrc.subr8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/bsdconfig/share/sysrc.subr b/usr.sbin/bsdconfig/share/sysrc.subr
index 80deaa8..51aabcc 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
#
OpenPOWER on IntegriCloud