From 4788ee6834a111c284e2a24954406bb0cdc1b488 Mon Sep 17 00:00:00 2001 From: Jaromil Date: Sat, 17 Jan 2015 02:29:57 +0100 Subject: [PATCH] Avoid proceeding to umount if a bind_mount is busy and close is not slamming. --- tomb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tomb b/tomb index cb8c25c..162c616 100755 --- a/tomb +++ b/tomb @@ -2392,12 +2392,11 @@ umount_tomb() { sudo umount $bind_mount || { [[ -n $SLAM ]] && { _success "Slamming tomb: killing all processes using this hook." - slam_tomb "$bind_mount" - [[ $? == 1 ]] && { - _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } - umount $bind_mount + slam_tomb "$bind_mount" || _failure "Cannot slam the bind hook ::1 hook::" $bind_mount + umount $bind_mount || _failure "Cannot slam the bind hook ::1 hook::" $bind_mount } || { - _warning "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount } + _failure "Tomb bind hook ::1 hook:: is busy, cannot close tomb." $bind_mount + } } done