1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

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

This commit is contained in:
Vlastimil Holer 2019-02-13 14:04:33 +01:00 committed by Ruben S. Montero
parent 320a8c26c0
commit f020fa20b9

View File

@ -363,8 +363,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`