Catch up with renaming of macros IRQn -> ICU_IRQn in i386/icu/icu.h,1.7
[dragonfly.git] / etc / rc.d / apm
blob0857d81c343caec5ec4f6c74aa14ce763ca28362
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.2 2004/01/26 17:21:15 rob Exp $
7 # PROVIDE: apm
8 # REQUIRE: DAEMON
9 # BEFORE: LOGIN
10 # KEYWORD: DragonFly
12 . /etc/rc.subr
14 name="apm"
15 rcvar=`set_rcvar`
16 start_precmd="apm_precmd"
17 command="/usr/sbin/${name}"
18 start_cmd="${command} -e enable"
19 stop_cmd="${command} -e disable"
20 status_cmd="apm_status"
22 apm_precmd()
24 case `${SYSCTL_N} hw.machine_arch` in
25 i386)
26 return 0
28 esac
29 return 1
32 apm_status()
34 case `${command} -s` in
36 echo "APM is enabled."
37 return 0
40 echo "APM is disabled"
42 esac
43 return 1
46 load_rc_config $name
47 run_rc_command "$1"