tomb

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

commit 220cb4e70b7c341a3f6e4d3dbc06e619c4216caf
parent 8d1c34b2d392152e5c87b3f1595abccb9d20e44c
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 25 Aug 2010 20:17:53 +0200

umount handle cases when more tombs are mounted

Diffstat:
Msrc/tomb | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/tomb b/src/tomb @@ -442,11 +442,22 @@ umount_tomb() { elif [ $how_many_tombs = 1 ]; then mapper=`ls /dev/mapper/tomb* 2>/dev/null` FILE=`mount | grep $mapper | awk '{print $3}'` + else + error "too many tombs mounted, please specify which to unmount:" + ls -l /dev/mapper/tomb* + echo + return fi else - mapper=`mount | grep $FILE | awk '{print $1}'` + if ! [ -r $FILE ]; then + error "tomb not found: $FILE" + error "please specify the full /dev/mapper/tomb* path" + return + fi + mapper=$FILE + FILE=`mount | grep $mapper | awk '{print $3}'` fi