summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2017-02-20 18:34:51 (GMT)
committer Jaromil <jaromil@dyne.org>2017-02-20 21:13:43 (GMT)
commit3f06bce8eb91eac4622549ae184d2ec9f4b90cc3 (patch)
tree3c3f4911323415b6b2f1e28fa3d4919e8b9118fc
parente37982d1144356fe592e67d46add97b88297be1d (diff)
failed bind-hooks (missing target) no more abort the mount operation
a warning is printed and the mounting goes forward without the hooks
-rwxr-xr-xtomb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tomb b/tomb
index 5f34d11..1dc49a1 100755
--- a/tomb
+++ b/tomb
@@ -2108,7 +2108,7 @@ exec_safe_bind_hooks() {
[[ -r "$mnt/bind-hooks" ]] || {
_verbose "bind-hooks not found in ::1 mount point::" $mnt
- return 1 }
+ return 0 }
typeset -Al maps # Maps of files and directories to mount
typeset -al mounted # Track already mounted files and directories
@@ -2134,7 +2134,7 @@ exec_safe_bind_hooks() {
[[ "${${maps[$dir]}[1]}" == "/" || "${${maps[$dir]}[1,2]}" == ".." ]] && {
_warning "bind-hooks map format: local/to/tomb local/to/\$HOME. Rolling back"
for dir in ${mounted}; do _sudo umount $dir; done
- return 1 }
+ return 0 }
if [[ ! -r "$HOME/${maps[$dir]}" ]]; then
_warning "bind-hook target not existent, skipping ::1 home::/::2 subdir::" $HOME ${maps[$dir]}