chiark / gitweb /
chiark-backup's snaprsync has new sshopts option. debian_version_4_1_15
authorianmdlvl <ianmdlvl>
Thu, 19 Apr 2007 19:12:46 +0000 (19:12 +0000)
committerianmdlvl <ianmdlvl>
Thu, 19 Apr 2007 19:12:46 +0000 (19:12 +0000)
backup/snaprsync
debian/changelog

index 780c68ebe73ad2fb0f0585ff1a3adc4d9a57da25..3b4bfc7954af9345580ca8b3c7436069856f20cd 100755 (executable)
@@ -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"
index 36e69432a11692efadf1ffad3112d32bebbcab4c..9d1fdac32922efffdd316280ea5c2b853c92eb83 100644 (file)
@@ -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 <ian@davenant.greenend.org.uk>  Thu, 19 Apr 2007 20:12:37 +0100
 
 chiark-utils (4.1.14) unstable; urgency=low