kumquat-buildroot/package/openrc
Adam Duskett bc66a64193 package/openrc: cleanup sysv-rcs script
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-12-21 23:02:36 +01:00
..
0001-init.d-sysctl.in-add-support-for-busybox-sysctl.patch package/openrc: add patch to support busybox version of sysctl 2019-05-18 23:24:49 +02:00
0002-sh-init.sh.Linux.in-change-run-lock-from-root-uucp-t.patch package/openrc: change /run/lock from root:uucp to root:daemon 2019-05-18 23:25:08 +02:00
Config.in
getty package/openrc: add support for spawning getty 2019-09-23 22:29:28 +02:00
openrc.hash package/openrc: new package 2019-05-18 22:43:44 +02:00
openrc.mk package/openrc: install sysv-rcs file 2019-12-19 22:21:49 +01:00
sysv-rcs package/openrc: cleanup sysv-rcs script 2019-12-21 23:02:36 +01:00