diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-12-24 11:35:06 -0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2011-12-31 22:05:50 +0100 |
commit | 926152dfa1c3b076488bf768ae6cd2282cfa5497 (patch) | |
tree | 39ee83c261d2d5238309599f35d706a17cb52d67 | |
parent | b89b684c2cece1f099a512dc7d7cbe0b2ad06b42 (diff) | |
download | backupninja-926152dfa1c3b076488bf768ae6cd2282cfa5497.tar.gz backupninja-926152dfa1c3b076488bf768ae6cd2282cfa5497.tar.bz2 |
Mangle rsync_options just after all other options were evaluated (#3702)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | handlers/rsync.in | 12 |
2 files changed, 10 insertions, 3 deletions
@@ -2,6 +2,7 @@ version 1.0 -- UNRELEASED handler changes rysnc: . Fix numericids option (Redmine#3691). + . Mangle $rsync_options just afterwards (Redmine#3702). dup: . Make the .dup generated by ninjahelper more consistent with example.dup. 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 } |