mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
package/iwd/S40iwd: on stop wait for daemon to exit and delete PID file
Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
This commit is contained in:
committed by
Marcus Hoffmann
parent
dabaf4ab46
commit
59bc42f1a6
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user