SOURCES: cpqarrayd.init - force-reload is not supposed to start se...

qboosh qboosh at pld-linux.org
Mon Nov 26 18:41:17 CET 2007


Author: qboosh                       Date: Mon Nov 26 17:41:17 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- force-reload is not supposed to start service if it is not running
- introduced try-restart (following LSB 3.1)

---- Files affected:
SOURCES:
   cpqarrayd.init (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SOURCES/cpqarrayd.init
diff -u SOURCES/cpqarrayd.init:1.5 SOURCES/cpqarrayd.init:1.6
--- SOURCES/cpqarrayd.init:1.5	Mon Nov 26 09:24:30 2007
+++ SOURCES/cpqarrayd.init	Mon Nov 26 18:41:11 2007
@@ -43,6 +43,18 @@
 	fi
 }
 
+condrestart() {
+	if [ -f /var/lock/subsys/cpqarrayd ]; then
+		stop
+		start
+	else
+		if [ $1 -ne 0 ]; then
+			msg_not_running cpqarrayd
+		fi
+		RETVAL=$1
+	fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -56,12 +68,18 @@
 	stop
 	start
 	;;
+try-restart)
+	condrestart 0
+	;;
+force-reload)
+	condrestart 7
+	;;
 status)
 	status cpqarrayd
 	RETVAL=$?
 	;;
 *)
-	msg_usage "$0 {start|stop|restart|force-reload|status}"
+	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
 	exit 3
 esac
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/cpqarrayd.init?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list