#! /bin/sh
#
# pmud	       Power Manager daemon for Apple powerbooks
#
# chkconfig: 2345 40 60
# description: pmud is a daemon which periodically polls the PMU \
#              (power manager) and performs functions such as enabling \
#              or disabling devices appropriately when the power source \
#              changes.
# processname: pmud
# config: /etc/powerlevels
# pidfile: /var/run/pmud.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source power daemon options
[ -f /etc/sysconfig/power ] && . /etc/sysconfig/power

# See how we were called.
case "$1" in
  start)
	echo -n "Starting pmud daemon: "
	daemon pmud $PMUD_FLAGS
	echo
	touch /var/lock/subsys/pmud
	;;
  stop)
	echo -n "Stopping pmud daemon: "
	killproc pmud
	echo
	rm -f /var/lock/subsys/pmud
	;;
  status)
	status pmud
	;;
  *)
	echo "Usage: pmud {start|stop|status}"
	exit 1
esac

exit 0
