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"
|
|
|
|
start_precmd="${name}_prestart"
|
|
|
|
start_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()
|
|
|
|
{
|
|
|
|
echo -n ' linux'
|
2006-06-21 09:53:25 +00:00
|
|
|
load_kld -e 'linux(aout|elf)' linux
|
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
|
|
|
}
|
|
|
|
|
|
|
|
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"
|