]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - libexec/rc/rc.d/linux
Merge ACPICA 20191018.
[FreeBSD/FreeBSD.git] / libexec / rc / rc.d / linux
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: linux
7 # REQUIRE: archdep
8 # KEYWORD: nojail
9
10 . /etc/rc.subr
11
12 name="linux"
13 desc="Enable Linux ABI"
14 rcvar="linux_enable"
15 start_cmd="${name}_start"
16 stop_cmd=":"
17
18 linux_start()
19 {
20         local _tmpdir
21
22         load_kld -e 'linux(aout|elf)' linux
23         case `sysctl -n hw.machine_arch` in
24         amd64)
25                 load_kld -e 'linux64elf' linux64
26                 ;;
27         esac
28         if [ -x /compat/linux/sbin/ldconfigDisabled ]; then
29                 _tmpdir=`mktemp -d -t linux-ldconfig`
30                 /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
31                 if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then
32                         cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache
33                 fi
34                 rm -rf ${_tmpdir}
35         fi
36 }
37
38 load_rc_config $name
39 run_rc_command "$1"