mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
bug #2104: delete unused persistent disk links
(cherry picked from commit 13d719a2b3)
This commit is contained in:
1 parent
03c21b587c
commit
6016c2d686
1 file changed
+2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user