mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
fix minor bug in tm_shared/mvds. readlink wasn't being evaluated properly
This commit is contained in:
parent
c69ee2fbac
commit
7bd78b6ef5
@ -49,19 +49,15 @@ SRC_HOST=`arg_host $SRC`
|
||||
# Move the image back to the datastore
|
||||
#-------------------------------------------------------------------------------
|
||||
MVSCRIPT=$(cat <<EOF
|
||||
SRC_READLN=eval "$READLINK -f $SRC_PATH"
|
||||
DST_READLN=eval "$READLINK -f $DST_PATH"
|
||||
umask 0007
|
||||
SRC_READLN=\$($READLINK -f $SRC_PATH)
|
||||
DST_READLN=\$($READLINK -f $DST_PATH)
|
||||
|
||||
if [ \( -L $SRC \) -a \( "$SRC_READLN" = "$DST_READLN" \) ] ; then
|
||||
echo "Not moving files to image repo, they are the same"
|
||||
if [ \( -L $SRC \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then
|
||||
echo "Not moving files to image repo, they are the same"
|
||||
else
|
||||
mv -f $SRC_PATH $DST_PATH
|
||||
fi
|
||||
|
||||
if [ -d $DST_PATH ]; then
|
||||
chmod 0770 $DST_PATH
|
||||
else
|
||||
chmod 0660 $DST_PATH
|
||||
qemu-img convert $SRC_PATH -O qcow2 $DST_PATH
|
||||
rm $SRC_PATH
|
||||
fi
|
||||
EOF
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user