mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
use rmdir
This commit is contained in:
parent
ca78e49cbd
commit
7c420a071c
@ -12,7 +12,7 @@ cleanup()
|
|||||||
if [ ! -z $localmp ]; then
|
if [ ! -z $localmp ]; then
|
||||||
umount -fl $localmp
|
umount -fl $localmp
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $localmp -rf
|
rmdir $localmp
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ cleanup()
|
|||||||
if [ ! -z $localmp ]; then
|
if [ ! -z $localmp ]; then
|
||||||
umount $localmp
|
umount $localmp
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $localmp -rf
|
rmdir $localmp
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,13 +12,13 @@ cleanup()
|
|||||||
if [ ! -z $snapshotdir ]; then
|
if [ ! -z $snapshotdir ]; then
|
||||||
umount $snapshotdir
|
umount $snapshotdir
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $snapshotdir -rf
|
rmdir $snapshotdir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -z $templatedir ]; then
|
if [ ! -z $templatedir ]; then
|
||||||
umount $templatedir
|
umount $templatedir
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $templatedir -rf
|
rmdir $templatedir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ fi
|
|||||||
|
|
||||||
mount $snapshoturl $snapshotdir
|
mount $snapshoturl $snapshotdir
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
rm -rf $snapshotdir
|
rmdir $snapshotdir
|
||||||
echo "5#can not mount $snapshoturl to $snapshotdir"
|
echo "5#can not mount $snapshoturl to $snapshotdir"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -65,7 +65,7 @@ fi
|
|||||||
|
|
||||||
mount $templateurl $templatedir
|
mount $templateurl $templatedir
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
rm -rf $templatedir
|
rmdir $templatedir
|
||||||
templatedir=""
|
templatedir=""
|
||||||
cleanup
|
cleanup
|
||||||
echo "7#can not mount $templateurl to $templatedir"
|
echo "7#can not mount $templateurl to $templatedir"
|
||||||
|
|||||||
@ -11,13 +11,13 @@ cleanup()
|
|||||||
if [ ! -z $snapshotdir ]; then
|
if [ ! -z $snapshotdir ]; then
|
||||||
umount $snapshotdir
|
umount $snapshotdir
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $snapshotdir -rf
|
rmdir $snapshotdir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -z $templatedir ]; then
|
if [ ! -z $templatedir ]; then
|
||||||
umount $templatedir
|
umount $templatedir
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm $templatedir -rf
|
rmdir $templatedir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ fi
|
|||||||
|
|
||||||
mount $snapshoturl $snapshotdir
|
mount $snapshoturl $snapshotdir
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
rm -rf $snapshotdir
|
rmdir $snapshotdir
|
||||||
echo "5#can not mount $snapshoturl to $snapshotdir"
|
echo "5#can not mount $snapshoturl to $snapshotdir"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -64,7 +64,7 @@ fi
|
|||||||
|
|
||||||
mount $templateurl $templatedir
|
mount $templateurl $templatedir
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
rm -rf $templatedir
|
rmdir $templatedir
|
||||||
templatedir=""
|
templatedir=""
|
||||||
cleanup
|
cleanup
|
||||||
echo "7#can not mount $templateurl to $templatedir"
|
echo "7#can not mount $templateurl to $templatedir"
|
||||||
@ -97,7 +97,7 @@ upgradeSnapshot()
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf $parent
|
rm -f $parent
|
||||||
else
|
else
|
||||||
upgradeSnapshot $parent
|
upgradeSnapshot $parent
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user