summaryrefslogtreecommitdiff
path: root/packages/openprotium-init/files/initscripts/syslog.file
diff options
context:
space:
mode:
authorAndrew Wilcox <andy@protium.com>2006-12-23 22:02:58 +0000
committerAndrew Wilcox <andy@protium.com>2006-12-23 22:02:58 +0000
commite934fbdc234809387a52cb3413b198101ca17a6e (patch)
treef095428810a4c3b47ed33db36976adf2b7745ec5 /packages/openprotium-init/files/initscripts/syslog.file
parent2431508da0e4c9982679df090d44ee477b7c9355 (diff)
openprotium-init: a descendant of slugos-init with protium and storcenter related changes.
Diffstat (limited to 'packages/openprotium-init/files/initscripts/syslog.file')
-rw-r--r--packages/openprotium-init/files/initscripts/syslog.file23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/openprotium-init/files/initscripts/syslog.file b/packages/openprotium-init/files/initscripts/syslog.file
new file mode 100644
index 0000000000..80ee5f0174
--- /dev/null
+++ b/packages/openprotium-init/files/initscripts/syslog.file
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Invoke the syslog startup if the configuration
+# uses 'file' (and, optionally, buffer) as the DESTINATION
+DESTINATION=
+test -f /etc/syslog.conf && . /etc/syslog.conf
+doit=
+
+for d in $DESTINATION
+do
+ case "$d" in
+ buffer) :;;
+ file) doit=1;;
+ 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