File keepalive-init.patch of Package keepalived

diff -Naur keepalived-1.4.5-orig/keepalived/etc/init.d/keepalived.suse.init.in keepalived-1.4.5/keepalived/etc/init.d/keepalived.suse.init.in
--- keepalived-1.4.5-orig/keepalived/etc/init.d/keepalived.suse.init.in	2018-05-26 20:10:42.000000000 +0200
+++ keepalived-1.4.5/keepalived/etc/init.d/keepalived.suse.init.in	2018-05-29 07:10:30.272118321 +0200
@@ -1,21 +1,22 @@
 #! /bin/sh
 
 ### BEGIN INIT INFO
-# Provides:	 keepalived
+# Provides:       keepalived
 # Required-Start: $remote_fs $syslog
-# Required-Stop : $remote_fs $syslog
-# Default-Start : 3 5
-# Default-Stop  : 0 1 2 6
-# Description   : Start keepalived to allow XY and provide YZ
-# continued on second line by '#<TAB>'
+# Required-Stop:  $remote_fs $syslog
+# Default-Start:  3 5
+# Default-Stop:   0 1 2 6
+# Short-Description: Start keepalived to manage IPVS & LVS
+# Description:    Start keepalived to manage IPVS & LVS
 ### END INIT INFO
 
 
 DAEMON="Keepalived daemon"
 DAEMON_BIN="@sbindir@/keepalived"
 DAEMON_CONF="@sysconfdir@/keepalived/keepalived.conf"
+DAEMON_SYSCONF="@sysconfdir@/sysconfig/keepalived"
 DAEMON_PIDFILE="@localstatedir@/run/keepalived.pid"
-DAEMON_OPT="-d"
+KEEPALIVED_OPTIONS="-d"
 #DAEMON_USER="root"
 SUPPORTS_HUP="yes"
 #       PidFile @localstatedir@/run/keepalived.pid
@@ -24,7 +25,18 @@
 pid_par=${DAEMON_PIDFILE:+"-p $DAEMON_PIDFILE"}
 usr_par=${DAEMON_USER:+"-u $DAEMON_USER"}
 
-test -x $DAEMON_BIN || exit 5
+test -x $DAEMON_BIN || { echo "$DAEMON_BIN not installed or executable";
+    if [ "$1" = "stop" ]; then exit 0;
+    else exit 5; fi; }
+
+test -r $DAEMON_CONF || { echo "$DAEMON_CONF not existing or readable";
+    if [ "$1" = "stop" ]; then exit 0;
+    else exit 6; fi; }
+
+# read sysconfig variables that might overwrite the daemon options
+if [ -r "$DAEMON_SYSCONF" ]; then
+   . "$DAEMON_SYSCONF"
+fi
 
 # Shell functions sourced from /etc/rc.status:
 #      rc_check         check and set local and overall rc status
@@ -72,8 +84,8 @@
 	    	    0) echo -n "- Warning: daemon already running. " ;;
 		    1) echo -n "- Warning: ${DAEMON_PIDFILE} exists. " ;;
 		esac
-#		echo "startproc $usr_par $pid_par ${DAEMON_BIN} ${DAEMON_OPT}"
-		startproc $usr_par $pid_par ${DAEMON_BIN} ${DAEMON_OPT}
+#		echo "startproc $usr_par $pid_par ${DAEMON_BIN} ${KEEPALIVED_OPTIONS}"
+		startproc $usr_par $pid_par ${DAEMON_BIN} ${KEEPALIVED_OPTIONS}
 		rc_status -v
 		;;
 	stop)
openSUSE Build Service is sponsored by