mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-26 06:46:30 +00:00
fix #51: added a check into umount_tomb() before removing mount point: if it's the default one, then delete it
This commit is contained in:
parent
262855fa10
commit
350eeb7483
3
src/tomb
3
src/tomb
@ -955,9 +955,12 @@ umount_tomb() {
|
|||||||
if ! [ $? = 0 ]; then
|
if ! [ $? = 0 ]; then
|
||||||
error "Tomb is busy, cannot umount!"
|
error "Tomb is busy, cannot umount!"
|
||||||
else
|
else
|
||||||
|
# this means we used a "default" mount point
|
||||||
|
if [ "${tombmount}" = "/media/${tombname}.tomb" ]; then
|
||||||
rmdir ${tombmount}
|
rmdir ${tombmount}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cryptsetup luksClose $mapper
|
cryptsetup luksClose $mapper
|
||||||
if ! [ $? = 0 ]; then
|
if ! [ $? = 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user