mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 06:07:38 +00:00
umount handle cases when more tombs are mounted
This commit is contained in:
parent
8d1c34b2d3
commit
220cb4e70b
13
src/tomb
13
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user