From a03c623bb1574922308347df36cd57c85e72981a Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Sun, 13 Aug 2006 16:03:35 +0000 Subject: [PATCH] Index: debian/changelog =================================================================== 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 | 12 +++++++----- debian/changelog | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/backup/snaprsync b/backup/snaprsync index 3e3391f..4d2f3ec 100755 --- a/backup/snaprsync +++ b/backup/snaprsync @@ -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 \ diff --git a/debian/changelog b/debian/changelog index 6a24e34..a1342bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. -- -- 2.30.2