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
14 echo $(nls "No kernel APM support")'!'
18 if [ ! -f /proc/apm ]; then
19 modprobe apm || no_kernel_supp
22 CONFIG=/etc/sysconfig/apmd
25 # See how we were called.
28 # Check if the service is already running?
29 if [ ! -f /var/lock/subsys/apmd ]; then
31 [ -r "$CONFIG" ] && . "$CONFIG"
32 daemon apmd "$APMD_OPTIONS"
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/apmd
36 msg_already_running APM
40 if [ -f /var/lock/subsys/apmd ]; then
43 rm -f /var/lock/subsys/apmd
58 msg_usage "$0 {start|stop|restart|force-reload|status}"