2002-06-13 22:14:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: abi
|
|
|
|
# REQUIRE: LOGIN
|
2003-05-05 15:38:41 +00:00
|
|
|
# BEFORE: securelevel
|
2004-10-07 13:55:26 +00:00
|
|
|
# KEYWORD: nojail
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
2005-12-19 10:57:00 +00:00
|
|
|
name="abi"
|
|
|
|
start_precmd="${name}_prestart"
|
|
|
|
start_cmd=":"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
sysv_start()
|
|
|
|
{
|
|
|
|
echo -n ' sysvipc'
|
|
|
|
kldload sysvmsg >/dev/null 2>&1
|
|
|
|
kldload sysvsem >/dev/null 2>&1
|
|
|
|
kldload sysvshm >/dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2005-12-19 10:57:00 +00:00
|
|
|
svr4_start()
|
|
|
|
{
|
|
|
|
echo -n ' svr4'
|
|
|
|
kldload svr4 > /dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
|
|
|
abi_prestart()
|
|
|
|
{
|
|
|
|
echo -n 'Additional ABI support:'
|
|
|
|
|
|
|
|
checkyesno sysvipc_enable && sysv_start
|
|
|
|
checkyesno linux_enable && linux_start
|
|
|
|
checkyesno svr4_enable && svr4_start
|
|
|
|
|
|
|
|
echo '.'
|
|
|
|
}
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|