Skip to content

Commit

Permalink
Only delete the temporary mountpoint directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
vermaden committed Oct 30, 2012
1 parent a476ca7 commit 4025f07
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions beadm
Expand Up @@ -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
;;

Expand Down

0 comments on commit 4025f07

Please sign in to comment.