diff options
| author | Andrew Wilcox <andy@protium.com> | 2006-12-23 22:04:11 +0000 |
|---|---|---|
| committer | Andrew Wilcox <andy@protium.com> | 2006-12-23 22:04:11 +0000 |
| commit | 77ba4ab623e452349b38c3098d7994326f921365 (patch) | |
| tree | 568998bb6645123a9236f1796db2765844a0ba65 /packages/openprotium-init/files/initscripts/syslog.network | |
| parent | 23c147314ce4024329500380dbca62baf45452db (diff) | |
| parent | e934fbdc234809387a52cb3413b198101ca17a6e (diff) | |
merge of '375e23fc245ce8133b9f6b1700490e3ff83121e7'
and 'a25740693ac2e076ba730cff4951a1681ae05cce'
Diffstat (limited to 'packages/openprotium-init/files/initscripts/syslog.network')
| -rw-r--r-- | packages/openprotium-init/files/initscripts/syslog.network | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/openprotium-init/files/initscripts/syslog.network b/packages/openprotium-init/files/initscripts/syslog.network new file mode 100644 index 0000000000..3d7f4ab8e6 --- /dev/null +++ b/packages/openprotium-init/files/initscripts/syslog.network @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Invoke the syslog startup if the configuration +# uses 'remote', or doesn't use 'buffer' or 'file' +DESTINATION= +test -f /etc/syslog.conf && . /etc/syslog.conf +doit= +doneit= + +for d in $DESTINATION +do + case "$d" in + buffer) doneit=1;; + file) doneit=1;; + remote) doit=1;; + *) doit=1 + echo "/etc/syslog.conf: $d: unknown destination" >&2 + exit 1;; + esac +done + +# One of doneit or doit is set unless the DESTINATION value +# is empty (which is probably an error), let syslog handle +# the error. +test \( -n "$doit" -o -z "$doneit" \) -a -x /etc/init.d/syslog && + exec /etc/init.d/syslog "$@" + +exit 0 |
