summaryrefslogtreecommitdiffstats
path: root/source/a/sysklogd/config/rc.syslog.new
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysklogd/config/rc.syslog.new')
-rw-r--r--source/a/sysklogd/config/rc.syslog.new49
1 files changed, 49 insertions, 0 deletions
diff --git a/source/a/sysklogd/config/rc.syslog.new b/source/a/sysklogd/config/rc.syslog.new
new file mode 100644
index 000000000..46208fab8
--- /dev/null
+++ b/source/a/sysklogd/config/rc.syslog.new
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Start/stop/restart the system logging daemons.
+#
+# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>.
+
+syslogd_start() {
+ if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then
+ echo -n "Starting sysklogd daemons: "
+ echo -n "/usr/sbin/syslogd "
+ /usr/sbin/syslogd
+ # prevent syslogd/klogd race condition on SMP kernels
+ if ps acx | grep -q udevd ; then
+ while [ ! -e /dev/log ] ; do
+ sleep 0
+ done
+ else
+ sleep 1
+ fi
+ echo "/usr/sbin/klogd -c 3 -x"
+ # '-c 3' = display level 'error' or higher messages on console
+ # '-x' = turn off broken EIP translation
+ /usr/sbin/klogd -c 3 -x
+ fi
+}
+
+syslogd_stop() {
+ killall syslogd 2> /dev/null
+ killall klogd 2> /dev/null
+}
+
+syslogd_restart() {
+ syslogd_stop
+ sleep 1
+ syslogd_start
+}
+
+case "$1" in
+'start')
+ syslogd_start
+ ;;
+'stop')
+ syslogd_stop
+ ;;
+'restart')
+ syslogd_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac