X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Frdiff.in;h=aa02a5541944cf4f9c2f3c6f6f585590fe227451;hp=46cae4981d0277e980d2b6671e32481e2aba4d67;hb=02a7436b7c606efd82e215ffc238aac3d5e21f7f;hpb=796e77ab9095baf8ebddde7d47d7b2da42a4eab7 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