Permalink
Browse files

Use 'ssh -n' to prevent ssh from (sometimes) sucking up the rest of

the input to the while loop.
  • Loading branch information...
adaugherity committed Feb 17, 2012
1 parent 6b07d24 commit 5993e22bc4918e953a2c30168f844608b5598ac2
Showing with 1 addition and 1 deletion.
  1. +1 −1 zfs-backup.sh
View
@@ -100,7 +100,7 @@ do_backup() {
[ "$DEBUG" -o "$VERBOSE" ] && echo "newest local snapshot: $snap2"
# needs public key auth configured beforehand
- newest_remote="$(ssh $REMUSER@$REMHOST /usr/sbin/zfs list -t snapshot -H -S creation -o name -d 1 $TARGET | grep $TAG | head -1)"
+ newest_remote="$(ssh -n $REMUSER@$REMHOST /usr/sbin/zfs list -t snapshot -H -S creation -o name -d 1 $TARGET | grep $TAG | head -1)"
if [ -z $newest_remote ]; then
echo "Error fetching remote snapshot listing via ssh to $REMUSER@$REMHOST." >&2
[ $DEBUG ] || touch $LOCK

0 comments on commit 5993e22

Please sign in to comment.