From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] radvd: improve startup script
Date: Wed, 25 Apr 2018 23:25:12 +0200 [thread overview]
Message-ID: <20180425232512.081aa142@windsurf> (raw)
In-Reply-To: <20180416021037.13345-1-casantos@datacom.ind.br>
Hello,
On Sun, 15 Apr 2018 23:10:37 -0300, Carlos Santos wrote:
> -RADVD=/usr/sbin/radvd
> +test -f /etc/radvd.conf || exit 0
I'm still not impressed by silent exit cases. Shouldn't we let radvd
fail to start and complain about the lack of radvd.conf ?
> +start() {
> + printf "Starting radvd: "
> + echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
> + start-stop-daemon -S -x /usr/sbin/radvd || {
> + echo "FAIL"
> + exit 1
> + }
Can we use the
[ $? = 0 ] && echo "OK" || echo "FAIL"
syntax that we use in almost all other init scripts ?
> + echo "OK"
> +}
> +
> +stop() {
> + printf "Stopping radvd: "
> + start-stop-daemon -K -q -x /usr/sbin/radvd || {
> + echo "FAIL"
> + exit 1
> + }
Ditto here.
Also, can we use a pid file managed by start-stop-daemon, like
S50dropbear is doing (and many other init scripts) ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-04-25 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 9:57 [Buildroot] [PATCH] radvd: improve startup script Carlos Santos
2017-09-26 22:26 ` Arnout Vandecappelle
2017-09-27 1:15 ` Carlos Santos
2017-09-27 2:16 ` [Buildroot] [PATCH v2]] " Carlos Santos
2017-10-07 21:31 ` Thomas Petazzoni
2018-04-16 2:10 ` [Buildroot] [PATCH v3] " Carlos Santos
2018-04-25 21:25 ` Thomas Petazzoni [this message]
2018-04-26 0:08 ` Carlos Santos
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=20180425232512.081aa142@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox