[yocto] [meta-cgl][PATCH 4/5] openais: fix corosync not quit

jackie.huang at windriver.com jackie.huang at windriver.com
Fri May 26 01:46:14 PDT 2017


From: Jackie Huang <jackie.huang at windriver.com>

On some targets, "/etc/init.d/openais stop" can not make
corosync quit since corosync does not respond to signal TERM.

Signed-off-by: yanjun.zhu <yanjun.zhu at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
 .../files/openais-fix-corosync-not-quit.patch      | 53 ++++++++++++++++++++++
 .../recipes-cgl/openais/openais_1.1.4.bb           |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta-cgl-common/recipes-cgl/openais/files/openais-fix-corosync-not-quit.patch

diff --git a/meta-cgl-common/recipes-cgl/openais/files/openais-fix-corosync-not-quit.patch b/meta-cgl-common/recipes-cgl/openais/files/openais-fix-corosync-not-quit.patch
new file mode 100644
index 0000000..f3f7279
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/openais/files/openais-fix-corosync-not-quit.patch
@@ -0,0 +1,53 @@
+commit e26a778dc3726666f6c15838c16efaca2e98abd6
+Author: yanjun.zhu <yanjun.zhu at windriver.com>
+Date:   Wed Mar 13 10:10:03 2013 +0800
+
+    openais: fix corosync not quit
+
+    In fsl-p5040, "/etc/init.d/openais stop" can not make corosync quit since corosync
+    does not respond to signal TERM.
+
+    Upstream-Status: Pending
+
+    Signed-off-by: yanjun.zhu <yanjun.zhu at windriver.com>
+
+diff -urpN a/init/generic.in b/init/generic.in
+--- a/init/generic.in
++++ b/init/generic.in
+@@ -39,18 +39,6 @@ failure()
+ 	echo -ne "[FAILED]\r"
+ }
+ 
+-status()
+-{
+-	pid=$(pidof $1 2>/dev/null)
+-	rtrn=$?
+-	if [ $rtrn -ne 0 ]; then
+-		echo "$1 is stopped"
+-	else
+-		echo "$1 ($proc with pid $pid) is running..."
+-	fi
+-	return $rtrn
+-}
+-
+ # rpm based distros
+ if [ -d @SYSCONFDIR@/sysconfig ]; then
+ 	[ -f @INITDDIR@/functions ] && . @INITDDIR@/functions
+@@ -98,16 +86,10 @@ stop()
+ 	! status $proc > /dev/null 2>&1 && return
+ 
+ 	echo -n "Signaling $desc ($prog) to terminate: "
+-	kill -TERM $(pidof $proc) > /dev/null 2>&1
++	echo -n "Please stop corosync using /etc/init.d/corosync-daemon stop"
+ 	success
+ 	echo
+ 
+-	echo -n "Waiting for $prog services to unload:"
+-	while status $proc > /dev/null 2>&1; do
+-		sleep 1
+-		echo -n "."
+-	done
+-
+ 	rm -f $LOCK_FILE
+ 	rm -f @LOCALSTATEDIR@/run/$prog.pid
+ 	success
diff --git a/meta-cgl-common/recipes-cgl/openais/openais_1.1.4.bb b/meta-cgl-common/recipes-cgl/openais/openais_1.1.4.bb
index d54b22f..9cc750a 100644
--- a/meta-cgl-common/recipes-cgl/openais/openais_1.1.4.bb
+++ b/meta-cgl-common/recipes-cgl/openais/openais_1.1.4.bb
@@ -11,6 +11,7 @@ SRC_URI = " \
     file://openais-fix-bash.patch \
     file://openais-fix-init-script.patch \
     file://openais-saTmrTimerReschedule-test-error.patch \
+    file://openais-fix-corosync-not-quit.patch \
     file://openais.service \
     "
 
-- 
2.11.0




More information about the yocto mailing list