merge of 8eaefa4f638dc67e29fb59fca3c6a98e4049eb09
[vuplus_openembedded] / packages / openprotium-init / files / initscripts / syslog.network
1 #!/bin/sh
2 #
3 # Invoke the syslog startup if the configuration
4 # uses 'remote', or doesn't use 'buffer' or 'file'
5 DESTINATION=
6 test -f /etc/syslog.conf && . /etc/syslog.conf
7 doit=
8 doneit=
9
10 for d in $DESTINATION
11 do
12         case "$d" in
13         buffer) doneit=1;;
14         file)   doneit=1;;
15         remote) doit=1;;
16         *)      doit=1
17                 echo "/etc/syslog.conf: $d: unknown destination" >&2
18                 exit 1;;
19         esac
20 done
21
22 # One of doneit or doit is set unless the DESTINATION value
23 # is empty (which is probably an error), let syslog handle
24 # the error.
25 test \( -n "$doit" -o -z "$doneit" \) -a -x /etc/init.d/syslog &&
26         exec /etc/init.d/syslog "$@"
27
28 exit 0