aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2007-11-02 00:12:04 +0000
committerMicah Anderson <micah@riseup.net>2007-11-02 00:12:04 +0000
commit02a7436b7c606efd82e215ffc238aac3d5e21f7f (patch)
treedf3e68ef9c71c9fd328c6eac994c788514b25112 /handlers
parent796e77ab9095baf8ebddde7d47d7b2da42a4eab7 (diff)
downloadbackupninja-02a7436b7c606efd82e215ffc238aac3d5e21f7f.tar.gz
backupninja-02a7436b7c606efd82e215ffc238aac3d5e21f7f.tar.bz2
added ignore_version option to rdiff handler to enable you override the version check
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rdiff.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/handlers/rdiff.in b/handlers/rdiff.in
index 46cae49..aa02a55 100644
--- a/handlers/rdiff.in
+++ b/handlers/rdiff.in
@@ -32,12 +32,12 @@ function get_version() {
# if user or host is missing, returns the local version.
if [ "$#" -lt 2 ]; then
debug "$RDIFFBACKUP -V"
- echo `$RDIFFBACKUP -V | cut -d. -f1,2`
+ echo `$RDIFFBACKUP -V`
else
local user=$1
local host=$2
debug "ssh $sshoptions $host -l $user '$RDIFFBACKUP -V'"
- echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup | cut -d. -f1,2"`
+ echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
fi
}
@@ -127,11 +127,13 @@ if [ "$testconnect" = "yes" ] || [ "${test}" -eq 1 ]; then
test_connection $destuser $desthost
fi
-# see that rdiff-backup has the same version at the source and destination
-sourceversion=`get_version $sourceuser $sourcehost`
-destversion=`get_version $destuser $desthost`
-if [ "$sourceversion" != "$destversion" ]; then
- fatal "rdiff-backup does not have the same version at the source and at the destination."
+if [ $ignore_version != "yes" ]; then
+ # see that rdiff-backup has the same version at the source and destination
+ sourceversion=`get_version $sourceuser $sourcehost`
+ destversion=`get_version $destuser $desthost`
+ if [ "$sourceversion" != "$destversion" ]; then
+ fatal "rdiff-backup does not have the same version at the source and at the destination."
+ fi
fi
# source specific checks