From 59bc42f1a6dbe808a2498ee1fd4b33cac6e097e3 Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Thu, 4 Jun 2026 16:42:29 +0200 Subject: [PATCH] package/iwd/S40iwd: on stop wait for daemon to exit and delete PID file Signed-off-by: Fiona Klute Signed-off-by: Marcus Hoffmann --- package/iwd/S40iwd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/iwd/S40iwd b/package/iwd/S40iwd index 978912c67f..c329f3bcc7 100644 --- a/package/iwd/S40iwd +++ b/package/iwd/S40iwd @@ -26,13 +26,20 @@ start() { stop() { printf 'Stopping %s: ' "$DAEMON" - start-stop-daemon --stop --quiet --pidfile "$PIDFILE" + start-stop-daemon --stop --pidfile "$PIDFILE" \ + --exec "/usr/libexec/$DAEMON" status=$? if [ "$status" -eq 0 ]; then echo "OK" else echo "FAIL" + return "$status" fi + while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \ + --exec "/usr/libexec/$DAEMON"; do + sleep 0.1 + done + rm -f "$PIDFILE" return "$status" }