File s390-tools-sles11sp2-dumpconf-restart-delay.patch of Package s390-tools

Description: dumpconf: Do not use DELAY_MINUTES for restart
Symptom:     Currently for restart the dumpconf script is delayed.
Problem:     When a restart is triggered, normally the user expects that
             the changes will be active immediately.
Solution:    To enable dumpconf immediately for restart DELAY_MINUTES is
             set to zero for that case.
Problem-ID:  74869
---
 etc/init.d/dumpconf |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

--- a/etc/init.d/dumpconf
+++ b/etc/init.d/dumpconf
@@ -14,6 +14,13 @@
 
 # chkconfig: 0123456 01 99
 
+# source function library
+if [ -r /lib/lsb/init-functions ]; then
+	. /lib/lsb/init-functions
+elif [ -r /etc/init.d/functions ]; then
+	. /etc/init.d/functions
+fi
+
 DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
 CMDFULL=$0
 CMD="dumpconf"
@@ -424,7 +431,7 @@ start()
 			"'$DELAY_MINUTES'." $ERRMSG
 		return
 	fi
-	if [ $DELAY_MINUTES -gt 0 ]; then
+	if [ "$ON_PANIC" != "stop" -a $DELAY_MINUTES -gt 0 ]; then
 		if [ -f $PIDFILE ]; then
 			pr_info "A delayed instance of" $CMD \
 				"is already active."
@@ -479,7 +486,7 @@ start()
 stop()
 {
 	if [ -f $PIDFILE ]; then
-		kill -TERM $(cat $PIDFILE)
+		killproc -p $PIDFILE -TERM
 	fi
 	echo none > $DUMP_CONFIG_DIR/dump_type || RETVAL=1
 	echo stop > $ON_PANIC_CONFIG_FILE || RETVAL=1
@@ -541,7 +548,12 @@ fi
 
 # See how we were called.
 case "$1" in
-	start|restart|reload|force-reload|try-restart)
+	restart|reload|force-reload|try-restart)
+		stop
+		DELAY_MINUTES=0
+		start
+		;;
+	start)
 		start $2
 		;;
 	stop)