aboutsummaryrefslogtreecommitdiff
path: root/rc.multi
blob: 1160ab49781ad7ca69e7d7c34a752593fd4bcf54 (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
36
37
#!/bin/bash
#
# /etc/rc.multi
#

. /etc/rc.conf
. /etc/rc.d/functions

run_hook multi_start

# Load sysctl variables if sysctl.conf is present
[[ -r /etc/sysctl.conf ]] && /sbin/sysctl -q -p &>/dev/null

# Start daemons
for daemon in "${DAEMONS[@]}"; do
	case ${daemon:0:1} in
		'!') continue;;     # Skip this daemon.
		'@') start_daemon_bkgd "${daemon#@}";;
		*)   start_daemon "$daemon";;
	esac
done

if [[ -x /etc/rc.local ]]; then
	/etc/rc.local
fi

run_hook multi_end

if [[ -f /run/bootlogd.pid ]]; then
	touch /var/log/boot
	kill $(< /run/bootlogd.pid)
	rm -f /run/bootlogd.pid
	sed -i -r -e 's/\^\[\[[0-9]?;?[0-9]?[0-9]?;?[0-9]?[0-9]?[ms]//g' \
                  -e 's/\^\[(\[151|%)G//g' /var/log/boot
fi

# vim: set ts=2 sw=2 noet: