1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-21 18:03:38 +03:00

development: Fix "scp: error: unexpected filename: ." (#2933)

(cherry picked from commit f020fa20b90154d37ce06b37f07ea38cac5fbeb2)
This commit is contained in:
Vlastimil Holer 2019-02-13 14:04:33 +01:00 committed by Ruben S. Montero
parent 6ec4069e9b
commit 6f04ba019b

View File

@ -349,8 +349,10 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
sync_cmd = "rsync -Laz --delete #{REMOTES_LOCATION}" <<
" #{host['NAME']}:#{remote_dir}"
else
sync_cmd = "scp -rp #{REMOTES_LOCATION}/* " \
"#{host['NAME']}:#{remote_dir} 2> /dev/null"
sync_cmd = "ssh #{host['NAME']}" \
" mkdir -p '#{remote_dir}' 2>/dev/null &&" \
" scp -rp #{REMOTES_LOCATION}/*" \
" #{host['NAME']}:#{remote_dir} 2> /dev/null"
end
`#{sync_cmd} 2>/dev/null`