aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-01-09 23:25:03 +0100
committerintrigeri <intrigeri@boum.org>2010-01-09 23:25:03 +0100
commit46eccf2fd0c894790405b2e3aae8dfb99f5a5d98 (patch)
tree07246e00cd442fa2651f6005f610b42c43e4d9e8
parent64c4d190a3ab6b4fa60b10208b32f3b270a72482 (diff)
downloadbackupninja-46eccf2fd0c894790405b2e3aae8dfb99f5a5d98.tar.gz
backupninja-46eccf2fd0c894790405b2e3aae8dfb99f5a5d98.tar.bz2
rdiff: fix confusing error if rdiff-backup cannot be found on remote server.
Thanks to maniacmartin <martin@maniacmartin.com> for the patch on which this one is based. This closes Redmine bug #1209.
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog1
-rw-r--r--handlers/rdiff.in8
3 files changed, 9 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index c8686eb..07d55c0 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -32,3 +32,4 @@ Tuomas Jormola <tj@solitudo.net> -- "when = manual" option
Ian Beckwith <ianb@erislabs.net> -- dup bandwidthlimit fix
Olivier Berger <oberger@ouvaton.org> -- dup debug output bugfix, reportinfo option
stefan <s.freudenberg@jpberlin.de> -- dup support for Amazon S3 buckets
+maniacmartin <martin@maniacmartin.com> -- rdiff confusing error message fix
diff --git a/ChangeLog b/ChangeLog
index f4009d7..b1e140b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@ version 0.9.7 -- UNRELEASED
reported as such.
rdiff:
. Fix include/exclude paths with spaces (Closes: #398435)
+ . Fix confusing error if rdiff-backup cannot be found on remote server.
sys:
. New luksheaders option (default=disabled) to backup the Luks header
of every Luks device.
diff --git a/handlers/rdiff.in b/handlers/rdiff.in
index 98a53a3..60386fa 100644
--- a/handlers/rdiff.in
+++ b/handlers/rdiff.in
@@ -31,6 +31,7 @@ function get_version() {
# given no arguments, returns the local version.
# given a user and host, returns the remote version.
# if user or host is missing, returns the local version.
+ local version
if [ "$#" -lt 2 ]; then
debug "$RDIFFBACKUP -V"
echo `$RDIFFBACKUP -V`
@@ -38,7 +39,12 @@ function get_version() {
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"`
+ version=`ssh $sshoptions $host -l $user "$RDIFFBACKUP -V"`
+ if [ $? = 127 ]; then
+ fatal "Unable to execute rdiff-backup on remote server. It probably isn't installed"
+ else
+ echo "$version" | grep rdiff-backup
+ fi
fi
}