mirror of
https://github.com/OpenNebula/one.git
synced 2025-04-01 06:50:25 +03:00
Fix snap copy in ssh drivers
This commit is contained in:
parent
93dfb43df8
commit
c60e021762
@ -46,9 +46,11 @@ DRIVER_PATH=$(dirname $0)
|
||||
|
||||
SRC_PATH=`arg_path $SRC`
|
||||
DST_PATH=`arg_path $DST`
|
||||
|
||||
SRC_PATH_SNAP="${SRC_PATH}.snap"
|
||||
DST_PATH_SNAP="${DST_PATH}.snap"
|
||||
|
||||
SRC_HOST=`arg_host $SRC`
|
||||
DST_HOST=`arg_host $DST`
|
||||
|
||||
DST_DIR=`dirname $DST_PATH`
|
||||
@ -81,7 +83,7 @@ log "Cloning $SRC in $DST_PATH"
|
||||
exec_and_log "$SCP -r $SRC $DST" "Error copying $SRC to $DST"
|
||||
|
||||
if [ -d "${SRC_PATH_SNAP}" ]; then
|
||||
exec_and_log "$SCP -r ${SRC_PATH_SNAP} ${DST_PATH_SNAP}" \
|
||||
exec_and_log "$SCP -r $SRC_HOST:${SRC_PATH_SNAP} $DST_HOST:${DST_PATH_SNAP}" \
|
||||
"Error copying $SRC to $DST"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user