summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-04-23 19:06:42 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-04-23 19:06:42 +0200
commitef6a356ad9ab6d11e8b45055dea9bd30da2096af (patch)
tree3a36a648c4036458c6ecb3738fe4e417986dd559 /bin
parent8f2e0fb1e5972e1fe1b267f5939c60097d28b3f3 (diff)
pkg: list_update_remote: Don't rely on ssh return status, !=0 does not always indicate failure
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pkg b/bin/pkg
index ec28da6..d76d9bb 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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" \