Add gcc40 build hooks. Gcc40 isn't built per default, you will have to
[dragonfly.git] / etc / rc.d / battd
1 #!/bin/sh
2 #
3 # $DragonFly: src/etc/rc.d/battd,v 1.1 2005/02/17 22:35:38 liamfoy Exp $
4 #
5
6 # PROVIDE: battd
7 # REQUIRE: DAEMON apm
8 # BEFORE:  LOGIN
9 # KEYWORD: DragonFly 
10
11 . /etc/rc.subr
12
13 name="battd"
14 rcvar=`set_rcvar`
15 start_precmd="battd_precmd"
16 command="/usr/sbin/${name}"
17 pidfile="/var/run/${name}.pid"
18
19 battd_precmd()
20 {
21         case `${SYSCTL_N} hw.machine_arch` in
22         i386)
23                 # Enable apm if it is not already enabled
24                 if ! checkyesno apm_enable  && \
25                     ! /etc/rc.d/apm forcestatus 1>/dev/null 2>&1
26                 then
27                         force_depend apm || return 1
28                 fi
29                 ;;
30         *)
31                 return 1
32                 ;;
33         esac
34         return 0
35 }
36
37 load_rc_config $name
38 run_rc_command "$1"