diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-23 19:06:42 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-23 19:06:42 +0200 |
commit | ef6a356ad9ab6d11e8b45055dea9bd30da2096af (patch) | |
tree | 3a36a648c4036458c6ecb3738fe4e417986dd559 /bin/pkg | |
parent | 8f2e0fb1e5972e1fe1b267f5939c60097d28b3f3 (diff) |
pkg: list_update_remote: Don't rely on ssh return status, !=0 does not always indicate failure
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -338,11 +338,11 @@ function list_update_remote { typeset -i ret=0 export PDIR if [[ $PKG_PROTO == 'ssh' ]] { - ssh $PKG_USER@$PKG_HOST "PDIR='$PDIR' $PKGLIST_PATH $PKG_PATH" > $tmpfile || ret=$? + ssh $PKG_USER@$PKG_HOST "PDIR='$PDIR' $PKGLIST_PATH $PKG_PATH" > $tmpfile } elif [[ $PKG_PROTO == 'file' ]] { - $PKGLIST_PATH $PKG_PATH > $tmpfile || ret=$? + $PKGLIST_PATH $PKG_PATH > $tmpfile } - if (( ret == 0 )) { + if [[ -n $(cat $tmpfile) ]] { cp $tmpfile .list-remote } else { die "remote list update failed\n" \ |