* [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script
@ 2025-12-30 14:51 Fiona Klute via buildroot
2026-01-01 9:31 ` Thomas Petazzoni via buildroot
2026-01-13 19:46 ` Arnout Vandecappelle via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Fiona Klute via buildroot @ 2025-12-30 14:51 UTC (permalink / raw)
To: buildroot; +Cc: Fiona Klute
* Wait for process to stop before deleting PID file, instead of fixed
wait during restart
* Use long form options
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
Restarting klogd is probably not common, but it's nicer this way. :-)
package/busybox/S02klogd | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/package/busybox/S02klogd b/package/busybox/S02klogd
index 0677e1e5ca..f76d4e72d4 100644
--- a/package/busybox/S02klogd
+++ b/package/busybox/S02klogd
@@ -13,7 +13,8 @@ KLOGD_ARGS=""
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
- start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
+ start-stop-daemon --start --background --make-pidfile \
+ --pidfile "$PIDFILE" --exec "/sbin/$DAEMON" \
-- -n $KLOGD_ARGS
status=$?
if [ "$status" -eq 0 ]; then
@@ -26,20 +27,24 @@ start() {
stop() {
printf 'Stopping %s: ' "$DAEMON"
- start-stop-daemon -K -q -p "$PIDFILE"
+ start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
- rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
+ return "$status"
fi
+ while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
+ --exec "/sbin/$DAEMON"; do
+ sleep 0.1
+ done
+ rm -f "$PIDFILE"
return "$status"
}
restart() {
stop
- sleep 1
start
}
--
2.51.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script
2025-12-30 14:51 [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script Fiona Klute via buildroot
@ 2026-01-01 9:31 ` Thomas Petazzoni via buildroot
2026-01-13 19:46 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-01 9:31 UTC (permalink / raw)
To: Fiona Klute via buildroot; +Cc: Fiona Klute
On Tue, 30 Dec 2025 15:51:17 +0100
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:
> * Wait for process to stop before deleting PID file, instead of fixed
> wait during restart
>
> * Use long form options
>
> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
> ---
> Restarting klogd is probably not common, but it's nicer this way. :-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script
2025-12-30 14:51 [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script Fiona Klute via buildroot
2026-01-01 9:31 ` Thomas Petazzoni via buildroot
@ 2026-01-13 19:46 ` Arnout Vandecappelle via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2026-01-13 19:46 UTC (permalink / raw)
To: Fiona Klute; +Cc: Arnout Vandecappelle, buildroot
In reply of:
> * Wait for process to stop before deleting PID file, instead of fixed
> wait during restart
>
> * Use long form options
>
> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Applied to 2025.02.x and 2025.11.x. Thanks
> ---
> Restarting klogd is probably not common, but it's nicer this way. :-)
>
> package/busybox/S02klogd | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/package/busybox/S02klogd b/package/busybox/S02klogd
> index 0677e1e5ca..f76d4e72d4 100644
> --- a/package/busybox/S02klogd
> +++ b/package/busybox/S02klogd
> @@ -13,7 +13,8 @@ KLOGD_ARGS=""
> start() {
> printf 'Starting %s: ' "$DAEMON"
> # shellcheck disable=SC2086 # we need the word splitting
> - start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
> + start-stop-daemon --start --background --make-pidfile \
> + --pidfile "$PIDFILE" --exec "/sbin/$DAEMON" \
> -- -n $KLOGD_ARGS
> status=$?
> if [ "$status" -eq 0 ]; then
> @@ -26,20 +27,24 @@ start() {
>
> stop() {
> printf 'Stopping %s: ' "$DAEMON"
> - start-stop-daemon -K -q -p "$PIDFILE"
> + start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/sbin/$DAEMON"
> status=$?
> if [ "$status" -eq 0 ]; then
> - rm -f "$PIDFILE"
> echo "OK"
> else
> echo "FAIL"
> + return "$status"
> fi
> + while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
> + --exec "/sbin/$DAEMON"; do
> + sleep 0.1
> + done
> + rm -f "$PIDFILE"
> return "$status"
> }
>
> restart() {
> stop
> - sleep 1
> start
> }
>
> --
> 2.51.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-13 19:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-30 14:51 [Buildroot] [PATCH 1/1] package/busybox: tidy up klogd init script Fiona Klute via buildroot
2026-01-01 9:31 ` Thomas Petazzoni via buildroot
2026-01-13 19:46 ` Arnout Vandecappelle via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox