2002-06-13 22:14:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: abi
|
2006-02-19 08:18:48 +00:00
|
|
|
# REQUIRE: archdep
|
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"
|
2006-12-20 11:37:15 +00:00
|
|
|
start_cmd="${name}_start"
|
|
|
|
stop_cmd=":"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
sysv_start()
|
|
|
|
{
|
|
|
|
echo -n ' sysvipc'
|
2006-06-21 09:53:25 +00:00
|
|
|
load_kld sysvmsg
|
|
|
|
load_kld sysvsem
|
|
|
|
load_kld sysvshm
|
2002-06-13 22:14:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
linux_start()
|
|
|
|
{
|
2006-12-30 22:53:20 +00:00
|
|
|
local _tmpdir
|
|
|
|
|
2002-06-13 22:14:37 +00:00
|
|
|
echo -n ' linux'
|
2006-06-21 09:53:25 +00:00
|
|
|
load_kld -e 'linux(aout|elf)' linux
|
2016-03-08 19:08:55 +00:00
|
|
|
case `sysctl -n hw.machine_arch` in
|
|
|
|
amd64)
|
|
|
|
load_kld -e 'linux64elf' linux64
|
|
|
|
;;
|
|
|
|
esac
|
2006-01-24 18:58:48 +00:00
|
|
|
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then
|
2006-01-11 21:30:41 +00:00
|
|
|
_tmpdir=`mktemp -d -t linux-ldconfig`
|
|
|
|
/compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
|
|
|
|
if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then
|
|
|
|
cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache
|
|
|
|
fi
|
|
|
|
rm -rf ${_tmpdir}
|
2002-06-13 22:14:37 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2005-12-19 10:57:00 +00:00
|
|
|
svr4_start()
|
|
|
|
{
|
|
|
|
echo -n ' svr4'
|
2006-06-21 09:53:25 +00:00
|
|
|
load_kld -m svr4elf svr4
|
2005-12-19 10:57:00 +00:00
|
|
|
}
|
|
|
|
|
2006-12-20 11:37:15 +00:00
|
|
|
abi_start()
|
2005-12-19 10:57:00 +00:00
|
|
|
{
|
2008-06-22 16:19:50 +00:00
|
|
|
local _echostop
|
|
|
|
|
|
|
|
_echostop=
|
|
|
|
if checkyesno sysvipc_enable || checkyesno linux_enable || checkyesno svr4_enable; then
|
|
|
|
echo -n 'Additional ABI support:'
|
|
|
|
_echostop=yes
|
|
|
|
fi
|
2005-12-19 10:57:00 +00:00
|
|
|
|
|
|
|
checkyesno sysvipc_enable && sysv_start
|
|
|
|
checkyesno linux_enable && linux_start
|
|
|
|
checkyesno svr4_enable && svr4_start
|
|
|
|
|
2008-06-22 16:19:50 +00:00
|
|
|
[ -n "${_echostop}" ] && echo '.'
|
2005-12-19 10:57:00 +00:00
|
|
|
}
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|