3 # chkconfig: 2345 35 65
4 # description: apmd is used for monitoring batery status and logging it via \
5 # syslog(8). It can also be used for shutting down the machine when \
8 # config: /etc/sysconfig/apmd
10 # Source function library.
11 . /etc/rc.d/init.d/functions
13 if [ ! -f /proc/apm ]; then
14 modprobe apm && echo $(nls "No kernel APM support")'!'; exit 1
17 CONFIG=/etc/sysconfig/apmd
19 # See how we were called.
22 # Check if the service is already running?
23 if [ ! -f /var/lock/subsys/apmd ]; then
25 [ -r "$CONFIG" ] && . "$CONFIG"
26 daemon apmd "$APMD_OPTIONS"
27 touch /var/lock/subsys/apmd
29 msg_already_running APM
33 if [ -f /var/lock/subsys/apmd ]; then
36 rm -f /var/lock/subsys/apmd
51 msg_usage "$0 {start|stop|restart|force-reload|status}"