From 330f3e99d272db13f5b392ce3243df2efa67138d Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Thu, 19 Apr 2007 19:12:46 +0000 Subject: [PATCH 1/1] chiark-backup's snaprsync has new sshopts option. --- backup/snaprsync | 23 ++++++++++++----------- debian/changelog | 3 ++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/backup/snaprsync b/backup/snaprsync index 780c68e..3b4bfc7 100755 --- a/backup/snaprsync +++ b/backup/snaprsync @@ -14,6 +14,7 @@ bwlimit= subdir=. rsyncopts= + sshopts= summer=summer set -e @@ -32,7 +33,7 @@ while true; do case "$name" in rhost|device|mountpoint|localarea);; localprevious|snapkind|rsharedir|retcdir|rvardir|bwlimit);; - subdir|rsyncopts|summer);; + subdir|rsyncopts|sshopts|summer);; *) badusage "unknown setting $name";; esac eval "$name=\$value" @@ -54,13 +55,13 @@ done datefmt='%Y-%m-%d %H:%M:%S Z' rsync="rsync ${bwlimit:+--bwlimit} $bwlimit" -export RSYNC_RSH='ssh -o compression=no' +export RSYNC_RSH="ssh -o compression=no $sshopts" sshpfx='PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin; export PATH; ' -ssh $rhost "$sshpfx date -u '+$rhost $datefmt start'" -ssh $rhost "$sshpfx id" -ssh $rhost "$sshpfx ls -d $rsharedir" -ssh $rhost "$sshpfx ls -d $rvardir" +ssh $sshopts $rhost "$sshpfx date -u '+$rhost $datefmt start'" +ssh $sshopts $rhost "$sshpfx id" +ssh $sshopts $rhost "$sshpfx ls -d $rsharedir" +ssh $sshopts $rhost "$sshpfx ls -d $rvardir" test -d $localarea || x mkdir $localarea ournode=`uname -n` @@ -75,16 +76,16 @@ td=`mktemp -td` mkfifo -m 600 $td/sentinel exec 4<>$td/sentinel -x ssh $rhost "$sshpfx $rsharedir/snap-drop" -ssh $rhost " +x ssh $sshopts $rhost "$sshpfx $rsharedir/snap-drop" +ssh $sshopts $rhost " $sshpfx set -e cd $rvardir echo '$retcdir/snap/$snapkind drop $rvardir' >snap-drop.new mv snap-drop.new snap-drop " -x ssh $rhost "$sshpfx $retcdir/snap/$snapkind snap $rvardir $device $mountpoint" -ssh $rhost <$td/sentinel 4<&- " +x ssh $sshopts $rhost "$sshpfx $retcdir/snap/$snapkind snap $rvardir $device $mountpoint" +ssh $sshopts $rhost <$td/sentinel 4<&- " $sshpfx set -e date -u '+$rhost $datefmt main' @@ -113,7 +114,7 @@ exec 3>&- xwait rsum exec 4<&- date -u "+ $datefmt sumsdone" -x ssh $rhost "$sshpfx $rsharedir/snap-drop" +x ssh $sshopts $rhost "$sshpfx $rsharedir/snap-drop" if [ "x${localprevious}" != x ] && test -f "$localprevious,rsums"; then cp "$localprevious,rsums" "$localarea,rsums" diff --git a/debian/changelog b/debian/changelog index 36e6943..9d1fdac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ chiark-utils (4.1.15) unstable; urgency=low * chiark-backup's snaprsync sedderies mountpoint out before sums diff. + * chiark-backup's snaprsync has new sshopts option. - -- + -- Ian Jackson Thu, 19 Apr 2007 20:12:37 +0100 chiark-utils (4.1.14) unstable; urgency=low -- 2.30.2