blob: beca9121172ae5bf6a5e3131b5572fd131cdc744 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: apmd
# REQUIRE: DAEMON apm
# BEFORE: LOGIN
# KEYWORD: nojail shutdown
. /etc/rc.subr
name="apmd"
rcvar="apmd_enable"
command="/usr/sbin/${name}"
start_precmd="apmd_prestart"
apmd_prestart()
{
case `${SYSCTL_N} hw.machine_arch` in
i386)
force_depend apm || return 1
# Warn user about acpi apm compatibility support which
# does not work with apmd.
if [ ! -e /dev/apmctl ]; then
warn "/dev/apmctl not found; kernel is missing apm(4)"
fi
;;
*)
return 1
;;
esac
}
load_rc_config $name
run_rc_command "$1"
|