Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rc/rc.d/abi
#!/bin/sh | #!/bin/sh | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# PROVIDE: abi | # PROVIDE: abi | ||||
# REQUIRE: archdep | # REQUIRE: archdep | ||||
# KEYWORD: nojail | # KEYWORD: nojail | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
name="abi" | name="abi" | ||||
desc="Enable foreign ABIs" | desc="Enable foreign ABIs" | ||||
start_cmd="${name}_start" | start_cmd="${name}_start" | ||||
stop_cmd=":" | stop_cmd=":" | ||||
sysv_start() | |||||
{ | |||||
echo -n ' sysvipc' | |||||
load_kld sysvmsg | |||||
load_kld sysvsem | |||||
load_kld sysvshm | |||||
} | |||||
linux_start() | linux_start() | ||||
{ | { | ||||
local _tmpdir | local _tmpdir | ||||
echo -n ' linux' | echo -n ' linux' | ||||
load_kld -e 'linux(aout|elf)' linux | load_kld -e 'linux(aout|elf)' linux | ||||
case `sysctl -n hw.machine_arch` in | case `sysctl -n hw.machine_arch` in | ||||
amd64) | amd64) | ||||
Show All 10 Lines | linux_start() | ||||
fi | fi | ||||
} | } | ||||
abi_start() | abi_start() | ||||
{ | { | ||||
local _echostop | local _echostop | ||||
_echostop= | _echostop= | ||||
if checkyesno sysvipc_enable || checkyesno linux_enable; then | if checkyesno linux_enable; then | ||||
echo -n 'Additional ABI support:' | echo -n 'Additional ABI support:' | ||||
_echostop=yes | _echostop=yes | ||||
fi | fi | ||||
checkyesno sysvipc_enable && sysv_start | |||||
checkyesno linux_enable && linux_start | checkyesno linux_enable && linux_start | ||||
[ -n "${_echostop}" ] && echo '.' | [ -n "${_echostop}" ] && echo '.' | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
run_rc_command "$1" | run_rc_command "$1" |