kernel/syscons - Fix excessive cpu latency during scrolling
[dragonfly.git] / etc / rc.d / battd
CommitLineData
48a120d3
LF
1#!/bin/sh
2#
696a5717 3# $DragonFly: src/etc/rc.d/battd,v 1.2 2005/11/19 21:47:32 swildner Exp $
48a120d3
LF
4#
5
6# PROVIDE: battd
7# REQUIRE: DAEMON apm
8# BEFORE: LOGIN
48a120d3
LF
9
10. /etc/rc.subr
11
12name="battd"
13rcvar=`set_rcvar`
14start_precmd="battd_precmd"
15command="/usr/sbin/${name}"
16pidfile="/var/run/${name}.pid"
17
18battd_precmd()
19{
20 case `${SYSCTL_N} hw.machine_arch` in
21 i386)
22 # Enable apm if it is not already enabled
23 if ! checkyesno apm_enable && \
24 ! /etc/rc.d/apm forcestatus 1>/dev/null 2>&1
25 then
26 force_depend apm || return 1
27 fi
28 ;;
29 *)
30 return 1
31 ;;
32 esac
33 return 0
34}
35
36load_rc_config $name
37run_rc_command "$1"