summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/abi
blob: c17b9cbc6d1bf40fbdf8b639b2a994e82f62a489 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: abi
# REQUIRE: LOGIN
# KEYWORD: FreeBSD

. /etc/rc.subr

echo -n 'Additional ABI support:'

name="sysvipc"
rcvar=`set_rcvar`
start_cmd="sysv_start"
stop_cmd=":"

sysv_start()
{
	echo -n ' sysvipc'
	kldload sysvmsg >/dev/null 2>&1
	kldload sysvsem >/dev/null 2>&1
	kldload sysvshm >/dev/null 2>&1
}
load_rc_config $name
run_rc_command "$1"

name="linux"
rcvar=`set_rcvar`
start_cmd="linux_start"

linux_start()
{
	echo -n ' linux'
	if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
		kldload linux > /dev/null 2>&1
	fi
	if [ -x /compat/linux/sbin/ldconfig ]; then
		/compat/linux/sbin/ldconfig
	fi
}
load_rc_config $name
run_rc_command "$1"

name="svr4"
rcvar=`set_rcvar`
start_precmd="echo -n ' svr4'"
start_cmd="kldload svr4 > /dev/null 2>&1"

load_rc_config $name
run_rc_command "$1"

echo '.'
OpenPOWER on IntegriCloud