mirror of
https://github.com/opnsense/src.git
synced 2026-03-18 00:25:50 -04:00
unconditionally. Reported by: Michael Butler <imb at protected-networks dot net> MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
39 lines
713 B
Bash
Executable file
39 lines
713 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: linux
|
|
# REQUIRE: archdep
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="linux"
|
|
desc="Enable Linux ABI"
|
|
rcvar="linux_enable"
|
|
start_cmd="${name}_start"
|
|
stop_cmd=":"
|
|
|
|
linux_start()
|
|
{
|
|
local _tmpdir
|
|
|
|
load_kld -e 'linux(aout|elf)' linux
|
|
case `sysctl -n hw.machine_arch` in
|
|
amd64)
|
|
load_kld -e 'linux64elf' linux64
|
|
;;
|
|
esac
|
|
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
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|