2001-06-16 09:16:14 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-14 00:14:37 +02:00
|
|
|
# $FreeBSD$
|
2001-06-16 09:16:14 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: apmd
|
2002-07-07 06:16:53 +02:00
|
|
|
# REQUIRE: DAEMON apm
|
2002-06-14 00:14:37 +02:00
|
|
|
# BEFORE: LOGIN
|
2008-07-16 21:50:29 +02:00
|
|
|
# KEYWORD: nojail shutdown
|
2001-06-16 09:16:14 +02:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="apmd"
|
2012-01-14 03:18:41 +01:00
|
|
|
rcvar="apmd_enable"
|
2001-06-16 09:16:14 +02:00
|
|
|
command="/usr/sbin/${name}"
|
2004-01-17 12:25:16 +01:00
|
|
|
start_precmd="apmd_prestart"
|
2002-07-07 06:16:53 +02:00
|
|
|
|
|
|
|
apmd_prestart()
|
|
|
|
{
|
2002-10-12 12:31:31 +02:00
|
|
|
case `${SYSCTL_N} hw.machine_arch` in
|
2003-05-06 02:09:51 +02:00
|
|
|
i386)
|
2012-02-14 11:51:24 +01:00
|
|
|
force_depend apm || return 1
|
2003-06-09 19:44:30 +02:00
|
|
|
|
|
|
|
# Warn user about acpi apm compatibility support which
|
|
|
|
# does not work with apmd.
|
|
|
|
if [ ! -e /dev/apmctl ]; then
|
2012-02-14 11:51:24 +01:00
|
|
|
warn "/dev/apmctl not found; kernel is missing apm(4)"
|
2003-06-09 19:44:30 +02:00
|
|
|
fi
|
2002-10-12 12:31:31 +02:00
|
|
|
;;
|
2002-07-07 06:16:53 +02:00
|
|
|
*)
|
|
|
|
return 1
|
|
|
|
;;
|
2002-10-12 12:31:31 +02:00
|
|
|
esac
|
2002-07-07 06:16:53 +02:00
|
|
|
}
|
|
|
|
|
2001-06-16 09:16:14 +02:00
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|