rvardir=/var/lib/chiark-backup
bwlimit=
subdir=.
+ rsyncopts=
+ summer=summer
set -e
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"
test -d $localarea || x mkdir $localarea
ournode=`uname -n`
rsumsfile=for-$ournode.sums
-summer='summer -ACDbtqf'
+summer="$summer -ACDbtqf"
td=/dev/enoent
rc=12
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"
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 \