4 # pmud Power Manager daemon for Apple powerbooks
6 # chkconfig: 2345 40 60
7 # description: pmud is a daemon which periodically polls the PMU \
8 # (power manager) and performs functions such as enabling \
9 # or disabling devices appropriately when the power source \
12 # config: /etc/sysconfig/power
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 if [ -f /etc/sysconfig/pmud ]; then
23 # See how we were called.
26 # Check if service is already running?
27 if [ ! -f /var/lock/subsys/pmud ]; then
28 # try load event module
30 daemon pmud $PMUD_FLAGS
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pmud
34 msg_already_running "pmud"
38 if [ -f /var/lock/subsys/pmud ]; then
41 rm -f /var/lock/subsys/pmud
56 msg_usage "$0 {start|stop|restart|force-reload|status}"