Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rc/rc.d/linux
Property | Old Value | New Value |
---|---|---|
svn:executable | null | * \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
#!/bin/sh | |||||
# | |||||
# $FreeBSD$ | |||||
# | |||||
# PROVIDE: linux | |||||
# REQUIRE: archdep | |||||
# KEYWORD: nojail | |||||
. /etc/rc.subr | |||||
name="linux" | |||||
desc="Enable Linux ABI" | |||||
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" |