kumquat-buildroot/package/busybox/S01logging
Javier Viguera fc6b5e4411 busybox: minor fixes to S01logging bootscript
* The PID file is not created unless the '-m' option is passed to
  start-stop-daemon.

* Remove the mark '-m 0' option as it's not supported by busybox's
  syslogd.

* Syslogd and Klogd forks to background by default giving as a result
  that the pid stored in the PID file is not correct. Let the
  background job be done by 'start-stop-daemon' by passing '-n'
  (foreground) to the daemons and '-b' to start-stop-daemon. This
  way the pid stored in the PID files is correct.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-06 12:00:41 +01:00

27 lines
495 B
Bash

#!/bin/sh
#
# Start logging
#
case "$1" in
start)
echo -n "Starting logging: "
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
echo "OK"
;;
stop)
echo -n "Stopping logging: "
start-stop-daemon -K -q -p /var/run/syslogd.pid
start-stop-daemon -K -q -p /var/run/klogd.pid
echo "OK"
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?