1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-12 08:58:17 +03:00

bug #2104: delete unused persistent disk links

(cherry picked from commit 13d719a2b391cf8836ae3b264aa51a6819e58a0a)
This commit is contained in:
Javi Fontan 2013-06-10 18:42:48 +02:00
parent e80803829a
commit 509b12a72e

View File

@ -62,6 +62,7 @@ DST_READLN=\$($READLINK -f $DST_PATH)
if [ -d $SRC_PATH ] ; then
if [ \( -L $SRC_PATH \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then
echo "Not moving files to image repo, they are the same"
rm $SRC_PATH
elif [ -f $SRC_PATH/.is_persistent ]; then
echo "Not moving files to image repo, they are the same"
else
@ -69,6 +70,7 @@ if [ -d $SRC_PATH ] ; then
fi
elif [ \( -L $SRC_PATH \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then
echo "Not moving files to image repo, they are the same"
rm $SRC_PATH
else
mv -f $SRC_PATH $DST_PATH
fi