busybox: rewrite logging init script
- Split S01logging into S01syslogd and S02klogd. Install them only if no
other syslog package is selected and the corresponding daemons are
selected in the Busybox configuration.
- Support /etc/default/$DAEMON configuration files.
- Detect and report start/stop errors (previous version ignored them and
always reported OK).
- Use a separate function for restart.
- Implement reload as restart.
The dependency of busybox on rsyslog and syslog-ng was only needed
because those packages also installed S01logging. Since now they no
longer install the same file, these dependencies are no longer needed.
The dependency on sysklogd is still needed since that one installs the
syslogd and klogd executables with the same name as busybox.
The -n option of syslogd/klogd is obligatory because start-stop-daemon
starts it in the background. Therefore, move it out of the
SYSLOGD_ARGS resp. KLOGD_ARGS variable so the user can no longer remove
it.
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
[Arnout: keep dependency on sysklogd]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>