summaryrefslogtreecommitdiffstats
path: root/rc/rc.multi
blob: 465332feac4dd0878be3c2c6874c931c23b761c9 (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
29
30
31
32
33
34
35
#!/bin/bash
#
# /etc/rc.multi: multi-user startup script
#

# Load configuration
. /etc/rc.conf

# Run fixes startup file
if [ -x /etc/rc.fix ]; then
        /etc/rc.fix
fi

# Start services
if [ "$SYSLOG" -o "${SERVICES[*]}" ]; then
	echo -n "starting services:"
	if [ -f /etc/rc.d/$SYSLOG -a -x /etc/rc.d/$SYSLOG ]; then
		echo -n " $SYSLOG"
		/etc/rc.d/$SYSLOG start &> /dev/null || echo -n "[ERROR]"
	fi
	for service in ${SERVICES[@]}; do
		echo -n " $service"
		/etc/rc.d/$service start &> /tmp/rc.$$ || echo -n "[ERROR]"
		/usr/bin/logger -t $service -f /tmp/rc.$$
		/bin/rm -f /tmp/rc.$$
	done
	echo
fi

# Run local startup script
if [ -x /etc/rc.local ]; then
	/etc/rc.local
fi

# End of file