bug #2104: delete unused persistent disk links

(cherry picked from commit 13d719a2b3)
This commit is contained in:
Javi Fontan committed 2013-06-10 18:44:47 +02:00
1 parent 03c21b587c
commit 6016c2d686
1 file changed
+2
+2
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