From: Jackie Huang <[email protected]> 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 <[email protected]> Signed-off-by: Jackie Huang <[email protected]> --- .../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 <[email protected]> +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 <[email protected]> + +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 -- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
