chiark / gitweb /
Index: debian/changelog
authorianmdlvl <ianmdlvl>
Sun, 13 Aug 2006 16:03:35 +0000 (16:03 +0000)
committerianmdlvl <ianmdlvl>
Sun, 13 Aug 2006 16:03:35 +0000 (16:03 +0000)
===================================================================
RCS file: /home/ianmdlvl/cvs/chiark-utils/debian/changelog,v
retrieving revision 1.116
diff -u -r1.116 changelog
--- debian/changelog 12 Aug 2006 19:00:57 -0000 1.116
+++ debian/changelog 13 Aug 2006 16:03:33 -0000
@@ -1,6 +1,9 @@
 chiark-utils (4.1.5) unstable; urgency=low

   * expire-iso8601 - new script.
+  * backup/snaprsync: allow setting of program to use for summer; allow
+    setting of rsync options; allow settings to be set to empty strings on
+    the command line; do not fail if localprevious,rsums is missing.

  --

backup/snaprsync
debian/changelog

index 3e3391fb6ac6d3d7b933e7c8919ab25e044a4c4a..4d2f3ecb6d01b6b44d04d723ca4ff786a268df19 100755 (executable)
@@ -13,6 +13,8 @@
        rvardir=/var/lib/chiark-backup
        bwlimit=
        subdir=.
+       rsyncopts=
+       summer=summer
 
 set -e
 
@@ -23,13 +25,13 @@ xwait () { eval "echo \"+[\$${1}pid] ($1)...\"; wait \$${1}pid;"; }
 
 while true; do
        case "$1" in
-       --?*=?*)
+       --?*=*)
                name=${1#--}; name=${name%%=*}
                value=${1#--*=}
                case "$name" in
                rhost|device|mountpoint|localarea);;
                localprevious|snapkind|rsharedir|retcdir|rvardir|bwlimit);;
-               subdir);;
+               subdir|rsyncopts|summer);;
                *) badusage "unknown setting $name";;
                esac
                eval "$name=\$value"
@@ -62,7 +64,7 @@ ssh $rhost "$sshpfx ls -d $rvardir"
 test -d $localarea || x mkdir $localarea
 ournode=`uname -n`
 rsumsfile=for-$ournode.sums
-summer='summer -ACDbtqf'
+summer="$summer -ACDbtqf"
 
 td=/dev/enoent
 rc=12
@@ -96,7 +98,7 @@ ssh $rhost <$td/sentinel 4<&- "
   cd ..
 " &
 xspawned rsum
-x $rsync -aHSxz --numeric-ids --delete \
+x $rsync -aHSxz --numeric-ids --delete $rsyncopts \
        ${localprevious:+--link-dest} $localprevious \
        $rhost:$rvardir/snap-mount/$subdir $localarea/.
 date -u "+ $datefmt rsyncdone"
@@ -112,7 +114,7 @@ exec 4<&-
 date -u "+ $datefmt sumsdone"
 x ssh $rhost "$sshpfx $rsharedir/snap-drop"
 
-if [ "x${localprevious}" != x ]; then
+if [ "x${localprevious}" != x ] && test -f "$localprevious,rsums"; then
        cp "$localprevious,rsums" "$localarea,rsums"
 fi
 x $rsync -p \
index 6a24e34ffb8444feb200374c0141b0f67b724ec9..a1342bb708805b9dc0d8e81952904cba21906736 100644 (file)
@@ -1,6 +1,9 @@
 chiark-utils (4.1.5) unstable; urgency=low
 
   * expire-iso8601 - new script.
+  * backup/snaprsync: allow setting of program to use for summer; allow
+    setting of rsync options; allow settings to be set to empty strings on
+    the command line; do not fail if localprevious,rsums is missing.
 
  --