diff options
author | dteske <dteske@FreeBSD.org> | 2014-03-07 20:18:39 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2014-03-07 20:18:39 +0000 |
commit | 0b0cb45bca49c2f8975df38dc2807989c3a5d7a8 (patch) | |
tree | 6914f15c7d8cac497f83b29ee365c518aefaebab /usr.sbin | |
parent | d8d6d667f6d44c35fe994a9e7eaf7c728f5a7043 (diff) | |
download | FreeBSD-src-0b0cb45bca49c2f8975df38dc2807989c3a5d7a8.zip FreeBSD-src-0b0cb45bca49c2f8975df38dc2807989c3a5d7a8.tar.gz |
Fix incorrect return status if var_to_set and var_to_get are the same.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bsdconfig/share/common.subr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr index 1653368..aa044b6 100644 --- a/usr.sbin/bsdconfig/share/common.subr +++ b/usr.sbin/bsdconfig/share/common.subr @@ -270,9 +270,9 @@ f_getvar() { local __var_to_get="$1" __var_to_set="$2" [ "$__var_to_set" ] || local value - eval ${__var_to_set:-value}=\"\${$__var_to_get}\" eval [ \"\${$__var_to_get+set}\" ] local __retval=$? + eval ${__var_to_set:-value}=\"\${$__var_to_get}\" eval f_dprintf '"f_getvar: var=[%s] value=[%s] r=%u"' \ \"\$__var_to_get\" \"\$${__var_to_set:-value}\" \$__retval [ "$__var_to_set" ] || { [ "$value" ] && echo "$value"; } |