This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
apmud/apmud-1.0.0-init.patch

72 lines
1.3 KiB
Diff

--- 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