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