mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-23 02:28:58 +00:00
before opening check if mountpoint is already used by a tomb
a simple check introduced on `tomb open` to list all tombs mounted and control if any mountpoint is already in use, in case refuse opening. fix #326
This commit is contained in:
parent
95f2f68654
commit
7b06be5d43
8
tomb
8
tomb
@ -2223,6 +2223,14 @@ mount_tomb() {
|
|||||||
_message "Mountpoint not specified, using default: ::1 mount point::" $tombmount
|
_message "Mountpoint not specified, using default: ::1 mount point::" $tombmount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check if the mountpoint is already used
|
||||||
|
mounted_tombs=(`list_tomb_mounts`)
|
||||||
|
for t in ${mounted_tombs}; do
|
||||||
|
usedmount=${t[(ws:;:)2]}
|
||||||
|
[[ "$usedmount" == "$tombmount" ]] &&
|
||||||
|
_failure "Mountpoint already in use: ::1 mount point::" $tombmount
|
||||||
|
done
|
||||||
|
|
||||||
_success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBNAME $tombmount
|
_success "Opening ::1 tomb file:: on ::2 mount point::" $TOMBNAME $tombmount
|
||||||
|
|
||||||
lo_mount $TOMBPATH
|
lo_mount $TOMBPATH
|
||||||
|
Loading…
Reference in New Issue
Block a user