#!/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