summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/share
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-06-02 23:20:46 +0000
committerdteske <dteske@FreeBSD.org>2013-06-02 23:20:46 +0000
commit2c5a7d38796183d684ed9ad702b8a48d9e6fc20c (patch)
tree635451c865af8f632f3f0510ad3ca1ecc6c7de73 /usr.sbin/bsdconfig/share
parent2d62c22a993847496b374145be7924d05cc273ae (diff)
downloadFreeBSD-src-2c5a7d38796183d684ed9ad702b8a48d9e6fc20c.zip
FreeBSD-src-2c5a7d38796183d684ed9ad702b8a48d9e6fc20c.tar.gz
Fix a bug in which the user's choice to Cancel was not recognized. This was
caused by the standard (and correct) behavior of the shell to discard the return status of lvalue-operands in a pipe-chain. The solution is to not pipe the file-acquisition directly into sort(1) but instead store the output (allowing immediate testing of the return status) and later sort it.
Diffstat (limited to 'usr.sbin/bsdconfig/share')
-rwxr-xr-xusr.sbin/bsdconfig/share/packages/index.subr3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr
index afbd31b..7525ae6 100755
--- a/usr.sbin/bsdconfig/share/packages/index.subr
+++ b/usr.sbin/bsdconfig/share/packages/index.subr
@@ -70,13 +70,14 @@ f_index_initialize()
f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \
"$__path"
- eval "$__var_to_set"='$( f_device_get media "$__path" | sort )'
+ eval "$__var_to_set"='$( f_device_get media "$__path" )'
if [ $? -ne $SUCCESS ]; then
f_show_msg "$msg_unable_to_get_file_from_selected_media" \
"$__path"
f_device_shutdown media
return $FAILURE
fi
+ eval "$__var_to_set"='$( debug= f_getvar "$__var_to_set" | sort )'
f_show_info "$msg_located_index_now_reading_package_data_from_it"
if ! f_index_read "$__var_to_set"; then
OpenPOWER on IntegriCloud