summaryrefslogtreecommitdiff
path: root/packages/openprotium-init/files/initscripts/syslog.buffer
diff options
context:
space:
mode:
Diffstat (limited to 'packages/openprotium-init/files/initscripts/syslog.buffer')
-rw-r--r--packages/openprotium-init/files/initscripts/syslog.buffer23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/openprotium-init/files/initscripts/syslog.buffer b/packages/openprotium-init/files/initscripts/syslog.buffer
new file mode 100644
index 0000000000..9285c02946
--- /dev/null
+++ b/packages/openprotium-init/files/initscripts/syslog.buffer
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Invoke the syslog startup if the configuration
+# uses (only) 'buffer' as the DESTINATION
+DESTINATION=
+test -f /etc/syslog.conf && . /etc/syslog.conf
+doit=
+
+for d in $DESTINATION
+do
+ case "$d" in
+ buffer) doit=1;;
+ file) exit 0;;
+ remote) exit 0;;
+ *) echo "/etc/syslog.conf: $d: unknown destination" >&2
+ exit 1;;
+ esac
+done
+
+test -n "$doit" -a -x /etc/init.d/syslog &&
+ exec /etc/init.d/syslog "$@"
+
+exit 0