From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/openrc: cleanup sysv-rcs script
Date: Sat, 21 Dec 2019 23:03:30 +0100 [thread overview]
Message-ID: <20191221230330.10a919fb@windsurf> (raw)
In-Reply-To: <20191220000437.475219-1-aduskett@gmail.com>
On Thu, 19 Dec 2019 16:04:37 -0800
aduskett at gmail.com wrote:
> From: Adam Duskett <aduskett@greenlots.com>
>
> Currently, the sysv-rcs script has two issues:
> - The return code of each RCS script is not checked.
> - The output does not match the formatting of the other openrc
> init scripts.
>
> Modify the script in the following ways to fix both issues:
> - Remove the "einfo "Starting sysv rc scripts"" at the top of the
> start function in favor of "einfo "Starting $i" in the loop
> itself.
>
> - Add a "> /dev/null" to the end of $i start; this suppresses
> stdout while still allowing for stderr messages to print to the
> terminal.
>
> - add an "eend $? to both the start and stop functions, this
> allows for openrc to show if an RCS script returned 0 or
> not.
>
> The following is the startup output of OpenRC on a minimal system
> with S01syslogd modified to exit with a return code 1 for testing
> purposes:
>
> Before:
> * Adding static routes ...
> [ ok ]
> Starting default runlevel
> * Starting sysv rc scripts
> Starting syslogd: OK
> Starting klogd: OK
> Running sysctl: OK
>
> After:
> * Adding static routes ...
> [ ok ]
> Starting default runlevel
> * Starting /etc/init.d/S01syslogd ...
> [ !! ]
> * Starting /etc/init.d/S02klogd ...
> [ ok ]
> * Starting /etc/init.d/S02sysctl ...
> [ ok ]
>
> Signed-off-by: Adam Duskett <aduskett@greenlots.com>
> ---
> package/openrc/sysv-rcs | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2019-12-21 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 0:04 [Buildroot] [PATCH 1/1] package/openrc: cleanup sysv-rcs script aduskett at gmail.com
2019-12-21 22:03 ` Thomas Petazzoni [this message]
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=20191221230330.10a919fb@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