aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rsync.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index 45b9b31..a17afbd 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -893,7 +893,7 @@ function set_rsync_options {
if [ "$from" == "local" ] || [ "$dest" == "local" ]; then
# rsync options for local sources or destinations
- rsync_options=($rsync_options)
+ true
fi
if [ "$from" == "remote" ] || [ "$dest" == "remote" ]; then
@@ -912,8 +912,6 @@ function set_rsync_options {
remote_rsync="$remote_rsync --fake-super"
fi
- rsync_options=($rsync_options --rsync-path="$remote_rsync")
-
if [ "$protocol" == "ssh" ]; then
if [ ! -e "$id_file" ]; then
fatal "SSH Identity file $id_file not found"
@@ -927,6 +925,14 @@ function set_rsync_options {
fi
+ # Mangle rsync_options so we can use quotes after all other
+ # options were evaluated.
+ if [ "$from" == "local" ] && [ "$dest" == "local" ]; then
+ rsync_options=($rsync_options)
+ else
+ rsync_options=($rsync_options --rsync-path="$remote_rsync")
+ fi
+
include_vservers
}