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.

[Ariadne: the `-k` is redundant anyway, since we are sending the KILL
 signal to begin with.]
This commit is contained in:
Sören Tempel 2020-01-15 21:41:32 +01:00 committed by Mike Frysinger
parent 25d5de8fd9
commit d87f5b2f24

View File

@ -48,7 +48,7 @@ do_unmount()
retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1 retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1
while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do
if command -v fuser >/dev/null 2>&1; then 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)" fuser $f_opts "$mnt" 2>/dev/null)"
fi fi
case " $pids " in case " $pids " in