mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug: persistent images can not be moved because they are the same
This commit is contained in:
parent
8fbc6a8207
commit
a044828c0d
@ -54,8 +54,11 @@ http://*)
|
||||
|
||||
*)
|
||||
log "Moving local image $SRC to the image repository"
|
||||
exec_and_log "mv -f $SRC $DST" \
|
||||
"Could not move $SRC to $DST"
|
||||
if [ \( -L $SRC \) -a \( "`$READLINK $SRC`" = "$DST" \) ] ; then
|
||||
log "Not moving files to image repo, they are the same"
|
||||
else
|
||||
exec_and_log "mv -f $SRC $DST" "Could not move $SRC to $DST"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -32,6 +32,7 @@ SED=/bin/sed
|
||||
SSH=/usr/bin/ssh
|
||||
SUDO=/usr/bin/sudo
|
||||
WGET=/usr/bin/wget
|
||||
READLINK=/bin/readlink
|
||||
|
||||
# Used for log messages
|
||||
SCRIPT_NAME=`basename $0`
|
||||
|
Loading…
x
Reference in New Issue
Block a user