From 466766292a61eed89b9f3411cb750c7d8e1b4cb6 Mon Sep 17 00:00:00 2001 From: "Ruben S.Montero" Date: Sat, 24 Dec 2011 04:33:44 +0100 Subject: [PATCH] feature #1020: Fix bugs when dealing with persistent imageswq --- src/image_mad/remotes/fs/mv | 4 +++- src/tm_mad/vmware/tm_ln.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/image_mad/remotes/fs/mv b/src/image_mad/remotes/fs/mv index 84c845803e..2abcb29fe7 100755 --- a/src/image_mad/remotes/fs/mv +++ b/src/image_mad/remotes/fs/mv @@ -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" diff --git a/src/tm_mad/vmware/tm_ln.sh b/src/tm_mad/vmware/tm_ln.sh index 5ae24f0c37..87dd227bb0 100755 --- a/src/tm_mad/vmware/tm_ln.sh +++ b/src/tm_mad/vmware/tm_ln.sh @@ -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"