tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit de283fde162c571e5ff5f87cbc7d089cef713a60
parent f293d89fb8729881a3f2d89bb07aaaae0aabdd10
Author: Jaromil <jaromil@dyne.org>
Date:   Thu, 24 Feb 2011 22:59:54 +0100

close single tomb

Diffstat:
Msrc/tomb | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/tomb b/src/tomb @@ -780,8 +780,13 @@ umount_tomb() { if [ "$how_many_tombs" = "0" ]; then error "there is no open tomb to be closed" return 1 + elif [ "$how_many_tombs" = "1" ]; then mapper=`find /dev/mapper -name 'tomb.*'` + notice "trying to close $mapper" + umount_tomb ${mapper} + return 1 + else error "too many tombs mounted, please specify which to unmount:" ls /dev/mapper/tomb.* @@ -803,6 +808,7 @@ umount_tomb() { return 0 fi + if [ -r "$1" ]; then # accepts relative and absolute path mapper="$1" elif [ -r /dev/mapper/${1} ]; then