aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/openprotium-init/files/initscripts/syslog.network
blob: 3d7f4ab8e64a35156cc6c3a209a49e9c4291844b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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