blob: 02e0031830498117ad418a24b762f60ef1cbd315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 3825e467b30b04cdfd25e24de9425df051d47a97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Wed, 15 Jan 2020 21:41:32 +0100
Subject: [PATCH] rc-mount: make timeout invocation compatible with busybox
timeout
Busybox timeout does not support the `-k` flag. As such, invoking fuser
from do_unmount never worked without this patch. This went unnoticed as
standard error is redirected to /dev/null. This patch fixes this by
simply removing the incompatible `-k` flag.
---
sh/rc-mount.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sh/rc-mount.sh b/sh/rc-mount.sh
index f443d4c5..b640541f 100644
--- a/sh/rc-mount.sh
+++ b/sh/rc-mount.sh
@@ -48,7 +48,7 @@ do_unmount()
retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1
while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do
if command -v fuser >/dev/null 2>&1; then
- pids="$(timeout -k 10 -s KILL "${rc_fuser_timeout:-60}" \
+ pids="$(timeout -s KILL "${rc_fuser_timeout:-60}" \
fuser $f_opts "$mnt" 2>/dev/null)"
fi
case " $pids " in
|