--- apmud/pmud.rc.orig 2005-02-13 19:12:05.000000000 +0000 +++ apmud/pmud.rc 2005-02-13 19:20:15.000000000 +0000 @@ -17,26 +17,60 @@ # 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: " +RETVAL=0 + +start() { + RETVAL=1 + if grep -i "PowerBook" /proc/cpuinfo >/dev/null; then + echo -n $"Starting pmud daemon: " + /usr/bin/trackpad notap &> /dev/null daemon pmud $PMUD_FLAGS + RETVAL=$? echo - touch /var/lock/subsys/pmud - ;; - stop) + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pmud + fi + return $RETVAL +} + +stop() { + RETVAL=1 + if grep -i "PowerBook" /proc/cpuinfo >/dev/null; then echo -n "Stopping pmud daemon: " killproc pmud + RETVAL=$? echo rm -f /var/lock/subsys/pmud + fi + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop ;; status) status pmud + RETVAL=$? ;; + restart|reload) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/pmud ]; then + stop + start + RETVAL=$? + fi + ;; *) - echo "Usage: pmud {start|stop|status}" + echo "Usage: pmud {start|stop|restart|condrestart|status}" exit 1 esac -exit 0 +exit $RETVAL