1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

development: Fix "scp: error: unexpected filename: ."

(cherry picked from commit 320a8c26c0c455edfdc5ea87ae2fad38817ee856)
This commit is contained in:
Devin Christensen 2019-02-13 05:37:01 -07:00 committed by Ruben S. Montero
parent 4e4d1d0c41
commit 6ec4069e9b
3 changed files with 4 additions and 4 deletions

View File

@ -349,8 +349,8 @@ 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 = "scp -rp #{REMOTES_LOCATION}/* " \
"#{host['NAME']}:#{remote_dir} 2> /dev/null"
end
`#{sync_cmd} 2>/dev/null`

View File

@ -74,7 +74,7 @@ class InformationManagerDriver < OpenNebulaDriver
if !action_is_local?(:MONITOR)
if do_update == "1" || @options[:force_copy]
# Use SCP to sync:
sync_cmd = "scp -r #{@local_scripts_base_path}/. " \
sync_cmd = "scp -r #{@local_scripts_base_path}/* " \
"#{host}:#{@remote_scripts_base_path}"
# Use rsync to sync:

View File

@ -268,7 +268,7 @@ private
SSHCommand.run("mkdir -p #{remote_dir}",host,logger)
# Use SCP to sync:
sync_cmd = "scp -rp #{REMOTES_LOCATION}/. #{host}:#{remote_dir}"
sync_cmd = "scp -rp #{REMOTES_LOCATION}/* #{host}:#{remote_dir}"
# Use rsync to sync:
# sync_cmd = "rsync -Laz #{REMOTES_LOCATION} #{host}:#{@remote_dir}"