]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openslug-init/openslug-init-0.10/initscripts/syslog.network
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openslug-init / openslug-init-0.10 / 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