SOURCES: pommed.init - /proc/acpi missing is failure, not success ...
qboosh
qboosh at pld-linux.org
Thu Dec 20 19:39:11 CET 2007
Author: qboosh Date: Thu Dec 20 18:39:11 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- /proc/acpi missing is failure, not success
- added try-restart action
---- Files affected:
SOURCES:
pommed.init (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/pommed.init
diff -u SOURCES/pommed.init:1.3 SOURCES/pommed.init:1.4
--- SOURCES/pommed.init:1.3 Thu Dec 20 19:28:30 2007
+++ SOURCES/pommed.init Thu Dec 20 19:39:06 2007
@@ -12,7 +12,7 @@
. /etc/rc.d/init.d/functions
# We can't run without acpi:
-[ -e /proc/acpi ] || exit
+[ -e /proc/acpi ] || exit 1
start() {
# Check if the service is already running?
@@ -48,6 +48,16 @@
fi
}
+condrestart() {
+ if [ -f /var/lock/subsys/pommed ]; then
+ stop
+ start
+ else
+ msg_not_running pommed
+ RETVAL=$1
+ fi
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -61,20 +71,18 @@
stop
start
;;
- reload)
- reload
+ try-restart)
+ condrestart 0
;;
-# ONLY if program allows reloading without stopping
-# otherwise include force-reload with 'reload'
- force-reload)
- reload
+ reload|force-reload)
+ reload
;;
status)
status pommed
RETVAL=$?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pommed.init?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list