Rename private to privdata and class to srclass to avoid conflicts with
[dragonfly/vkernel-mp.git] / etc / rc.d / apm
blob592de01c1f8871fdde1e902b61180533a1d8a262
1 #!/bin/sh
3 # $FreeBSD: src/etc/rc.d/apm,v 1.4 2003/06/09 17:44:30 mtm Exp $
4 # $DragonFly: src/etc/rc.d/apm,v 1.3 2005/11/19 22:47:32 swildner Exp $
7 # PROVIDE: apm
8 # REQUIRE: DAEMON
9 # BEFORE: LOGIN
11 . /etc/rc.subr
13 name="apm"
14 rcvar=`set_rcvar`
15 start_precmd="apm_precmd"
16 command="/usr/sbin/${name}"
17 start_cmd="${command} -e enable"
18 stop_cmd="${command} -e disable"
19 status_cmd="apm_status"
21 apm_precmd()
23 case `${SYSCTL_N} hw.machine_arch` in
24 i386)
25 return 0
27 esac
28 return 1
31 apm_status()
33 case `${command} -s` in
35 echo "APM is enabled."
36 return 0
39 echo "APM is disabled"
41 esac
42 return 1
45 load_rc_config $name
46 run_rc_command "$1"