diff options
author | P. J. McDermott <pjm@nac.net> | 2012-04-26 20:53:22 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-04-26 20:53:22 (EDT) |
commit | c0807375ff3dd6242d9981e8add2d941bf52d379 (patch) | |
tree | eadc5bfc487cd70466cdfbefc1f99ecd2e9b09c2 | |
parent | e4199494aeda5760d823e2e73ae7f6527b902096 (diff) |
Add "syslog" service.
-rwxr-xr-x | build | 3 | ||||
-rw-r--r-- | src/etc/init.d/syslog | 30 |
2 files changed, 32 insertions, 1 deletions
@@ -40,7 +40,8 @@ basefiles.buildstamp: ln -s ../init.d/sysfs etc/rc.d/S01sysfs && \ ln -s ../init.d/mdev etc/rc.d/S02mdev && \ ln -s ../init.d/mountall etc/rc.d/S03mountall && \ - ln -s ../init.d/networking etc/rc.d/S04networking + ln -s ../init.d/networking etc/rc.d/S04networking && \ + ln -s ../init.d/syslog etc/rc.d/S05syslog oh-installfiles $(PKGS) oh-installdocs basefiles oh-gencontrol $(PKGS) diff --git a/src/etc/init.d/syslog b/src/etc/init.d/syslog new file mode 100644 index 0000000..4979ce6 --- /dev/null +++ b/src/etc/init.d/syslog @@ -0,0 +1,30 @@ +#!/bin/sh + +SYSLOG_ROTATE_SIZE=65536 + +case "${1}" in + start) + printf 'Starting syslog... ' + start-stop-daemon -S syslogd -m 0 -s "${SYSLOG_ROTATE_SIZE}" -L + printf 'done.' + printf 'Starting klogd... ' + start-stop-daemon -S klogd + printf 'done.' + ;; + stop) + printf 'Stopping klogd... ' + start-stop-daemon -K klogd + printf 'done.' + printf 'Stopping syslog... ' + start-stop-daemon -K syslogd + printf 'done.' + ;; + restart) + "${0}" stop + "${0}" start + ;; + *) + printf 'Usage: %s {start|stop|restart}\n' "${0}" + exit 1 + ;; +esac |