1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

feature #1020: Fix for better vmware disk moving

This commit is contained in:
Tino Vazquez 2011-12-22 18:34:24 +01:00
parent 3cf891ff66
commit cb5e13c149
2 changed files with 7 additions and 2 deletions

View File

@ -56,5 +56,8 @@ for file in `find $RELATIVE_SRC_PATH/* -type f`; do
exec_and_log "ln -sf ../$file $DST_PATH/$file_name"
done
# Put the symlink mark for tm_mv
exec_and_log "ln -sf $RELATIVE_SRC_PATH $DST_PATH/.disk"

View File

@ -41,9 +41,11 @@ SRC_PATH=`fix_dir_slashes "$SRC_PATH"`
if [ "$SRC_PATH" = "$DST_PATH" ]; then
log "Will not move, source and destination are equal"
elif [ -f "$SRC_PATH/.disk" ]; then # This link was set in tm_ln.sh
 exec_and_log "mv $SRC_PATH/.disk $DST_PATH"
elif echo $SRC_PATH | grep -q 'disk\.[0-9]\+$'; then
log "Moving $SRC_PATH"
exec_and_log "mv $SRC_PATH $DST_PATH"
   log "Moving $SRC_PATH"
   exec_and_log "mv $SRC_PATH $DST_PATH"
elif [ -d $SRC_PATH ]; then
log "Will not move, is not saving image"
else