[yocto] [meta-cgl][PATCH 3/3] ocfs2-tools: disable stack user support explicitly in init script

jackie.huang at windriver.com jackie.huang at windriver.com
Thu Jul 27 19:32:17 PDT 2017


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

Disable stack user support explicitly and only support
stack 'o2cb' in init script o2cb.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
 .../disable-ocfs2-stack-user-support.patch         | 42 ++++++++++++++++++++++
 .../recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb   |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch

diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
new file mode 100644
index 0000000..8d92f0c
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
@@ -0,0 +1,42 @@
+Only support stack 'o2cb' in init script o2cb.
+
+Source file /etc/init.d/functions rather than /lib/lsb/init-functions which
+doesn't exist in wrlinux.  /etc/init.d/functions provides functions killproc
+and pidofproc, and doesn't provides function start_daemon. It doesn't matter
+that start_daemon is used by stack 'user' only.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang at windriver.com>
+---
+diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh
+index 2e73108..926e61e 100755
+--- a/vendor/common/o2cb.init.sh
++++ b/vendor/common/o2cb.init.sh
+@@ -18,11 +18,11 @@
+ # Force LC_ALL=C
+ export LC_ALL=C
+ 
+-# Let's try to use the LSB functions
+-. /lib/lsb/init-functions
++# Let's try to use the init scripts functions
++. /etc/init.d/functions
+ if [ $? != 0 ]
+ then
+-    echo "Unable to load LSB init functions" >&2
++    echo "Unable to load init scripts functions" >&2
+     exit 1
+ fi
+ 
+@@ -72,6 +72,11 @@ VERSION=@@VERSION@@
+ # Need this default
+ [ -z "$O2CB_STACK" ] && O2CB_STACK=o2cb
+ 
++if [ "$O2CB_STACK" != "o2cb" ]; then
++    echo "Invalid cluster stack name \"$O2CB_STACK\""
++    exit 1
++fi
++
+ configfs_path()
+ {
+     # Note that this is only valid *after* configfs is loaded
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
index be9a505..6e5b1fd 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 SRC_URI = "git://oss.oracle.com/git/ocfs2-tools.git \
     file://0003-vendor-common-o2cb.ocf-add-new-conf-file.patch \
+    file://disable-ocfs2-stack-user-support.patch \
     file://o2cb.service \
     file://ocfs2.service \
 "
-- 
2.11.0




More information about the yocto mailing list