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

feature #1020: Fix bugs when dealing with persistent imageswq

This commit is contained in:
Ruben S.Montero 2011-12-24 04:33:44 +01:00
parent ea558a993e
commit 466766292a
2 changed files with 4 additions and 2 deletions

View File

@ -53,7 +53,9 @@ http://*)
*)
log "Moving local image $SRC to the image repository"
if [ \( -L $SRC \) -a \( "`$READLINK $SRC`" = "$DST" \) ] ; then
if [ \( -L $SRC \) -a \
\( "`$READLINK -f $SRC`" = "`$READLINK -f $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"

View File

@ -51,4 +51,4 @@ for file in `find $SRC_PATH -type f`; do
done
#Mark this disk persistent with a symlink for tm_mv and repo mv
exec_and_log "ln -sf $REL_SRC_PATH $DST_PATH/.disk"
exec_and_log "ln -sf ${REL_SRC_PATH#../../} $DST_PATH/.disk"