Only delete the temporary mountpoint directory.
This commit is contained in:
parent
a476ca72a0
commit
4025f07c3f
9
beadm
9
beadm
|
|
@ -735,9 +735,14 @@ EOF
|
|||
fi
|
||||
done
|
||||
echo "Unmounted successfully"
|
||||
if [ $( find ${MOUNTPOINT} | head | wc -l | bc ) -eq 1 ]
|
||||
# only delete the temporary mountpoint directory
|
||||
if echo "${MOUNTPOINT}" | grep -q "/tmp/BE-${2}." 1> /dev/null 2> /dev/null
|
||||
then
|
||||
rm -r ${MOUNTPOINT}
|
||||
# delete only when it is an empty directory
|
||||
if [ $( find ${MOUNTPOINT} | head | wc -l | bc ) -eq 1 ]
|
||||
then
|
||||
rm -r ${MOUNTPOINT}
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue