All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: Bernd Kuhls <bernd@kuhls.net>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] package/dnsmasq: Fix init script restart command
Date: Sat, 1 Jun 2024 22:19:31 +0200	[thread overview]
Message-ID: <ZluCU3w40FzxVl1h@landeda> (raw)
In-Reply-To: <20240531185328.2586537-1-fiona.klute@gmx.de>

fiona, All,

On 2024-05-31 20:53 +0200, Fiona Klute via buildroot spake thusly:
> I have had constant issues restarting dnsmasq. Stop works, start fails

We try to have commit logs with a neutral tone, i.e. not in the first
person, so I slightly rephrased that sentence. I also reflowed the
part with the example failure.

Also, see below...

[--SNIP--]
> diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq
> index 175daf9d26..27163f5205 100644
> --- a/package/dnsmasq/S80dnsmasq
> +++ b/package/dnsmasq/S80dnsmasq
> @@ -16,6 +16,13 @@ case "$1" in
>  		printf "Stopping dnsmasq: "
>  		start-stop-daemon -K -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON"
>  		[ $? = 0 ] && echo "OK" || echo "FAIL"
> +		# wait for dnsmasq process to be gone
> +		while true; do
> +			pid="$( cat "${PIDFILE}" 2>/dev/null || true )"
> +			( [ -n "${pid}" ] && [ -d "/proc/${pid}" ] ) || break

I have a hook that runs check-paakcage without the exclusion list, and
that also runs shellcheck:

    $ ./utils/docker-run shellcheck package/dnsmasq/S80dnsmasq
    In package/dnsmasq/S80dnsmasq line 22:
                            ( [ -n "${pid}" ] && [ -d "/proc/${pid}" ] ) || break
                            ^-- SC2235: Use { ..; } instead of (..) to avoid subshell overhead.

So I fixed that (as well as the two other warnings that are unrelated to
your change), and applied to master, thanks.

Regards,
Yann E. MORIN.

> +			sleep 0.1
> +		done
> +		rm -f "$PIDFILE"
>  		;;
>  	restart|reload)
>  		$0 stop
> --
> 2.45.1
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-06-01 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 18:53 [Buildroot] [PATCH v2 1/1] package/dnsmasq: Fix init script restart command Fiona Klute via buildroot
2024-06-01 20:19 ` Yann E. MORIN [this message]
2024-06-08 16:59 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZluCU3w40FzxVl1h@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    --cc=fiona.klute@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.