diff options
Diffstat (limited to 'recipes/openprotium-init/files/initscripts/syslog.network')
-rw-r--r-- | recipes/openprotium-init/files/initscripts/syslog.network | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes/openprotium-init/files/initscripts/syslog.network b/recipes/openprotium-init/files/initscripts/syslog.network new file mode 100644 index 0000000000..3d7f4ab8e6 --- /dev/null +++ b/recipes/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 |