package/openssh/S50sshd: immediately return if sending stop fails

If sending the stop signal fails but the PID file exists the following
shutdown wait turns into an endless loop. Avoid that and return the
error immediately.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
(cherry picked from commit 34f4732f1a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Fiona Klute
2026-05-01 02:23:18 +02:00
committed by Thomas Perale
parent 4452bdb483
commit 9b0561e2e1

View File

@@ -36,6 +36,7 @@ stop() {
echo "OK"
else
echo "FAIL"
return "$status"
fi
# sshd deletes its PID file on exit, wait for it to be gone
while [ -f "$PIDFILE" ]; do