d07e9ef4b2
the ongoing re-alignment of ordering that is necessary as a result of including local scripts in the base rcorder. [1] Accomplish this by removing the BEFORE's, and using REQUIRE instead. This makes the dependencies more obvious, and less susceptible to turning circular and/or nonsensical when seemingly innocent changes are made in one place and not another. Requested by: delphij [1]
59 lines
1.0 KiB
Bash
59 lines
1.0 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: abi
|
|
# REQUIRE: archdep
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="abi"
|
|
start_precmd="${name}_prestart"
|
|
start_cmd=":"
|
|
|
|
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/ldconfigDisabled ]; then
|
|
_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}
|
|
fi
|
|
}
|
|
|
|
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 '.'
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|