Add a conditional RDEPENDS for lsbinitscripts which are needed by the o2cb and ofcs2 services and not supplied by systemd.
Also, do not look for a redhat-release file in the o2cb and ocfs2 scripts. Just use /etc/init.d/functions if it exists. Signed-off-by: Joe Slater <[email protected]> --- .../ocfs2-tools/ocfs2-tools/no-redhat.patch | 22 ++++++++++++++++++++++ .../recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.5.bb | 8 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/no-redhat.patch diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/no-redhat.patch b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/no-redhat.patch new file mode 100644 index 0000000..7347786 --- /dev/null +++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/no-redhat.patch @@ -0,0 +1,22 @@ +--- a/vendor/common/o2cb.init.sh ++++ b/vendor/common/o2cb.init.sh +@@ -18,7 +18,7 @@ + # Force LC_ALL=C + export LC_ALL=C + +-if [ -f /etc/redhat-release ] ++if [ -f /etc/init.d/functions ] + then + . /etc/init.d/functions + +--- a/vendor/common/ocfs2.init ++++ b/vendor/common/ocfs2.init +@@ -17,7 +17,7 @@ + # Description: Mount OCFS2 volumes at boot. + ### END INIT INFO + +-if [ -f /etc/redhat-release ] ++if [ -f /etc/init.d/functions ] + then + . /etc/init.d/functions + diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.5.bb b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.5.bb index 946423e..5aeb053 100644 --- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.5.bb +++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.5.bb @@ -16,6 +16,7 @@ SRC_URI = "git://github.com/markfasheh/ocfs2-tools \ file://0003-vendor-common-o2cb.ocf-add-new-conf-file.patch \ file://ocfs2-fix-compile-error-when-glibc-upgrade.patch \ file://ocfs2-tools-1.8.5-format-fortify.patch \ + file://no-redhat.patch \ file://o2cb.service \ file://ocfs2.service \ " @@ -28,7 +29,12 @@ DEPENDS = "corosync pacemaker \ libxml2 linux-libc-headers libaio \ e2fsprogs e2fsprogs-native \ " -RDEPENDS_${PN} = "bash coreutils net-tools module-init-tools e2fsprogs chkconfig glib-2.0" + +# lsbinitscripts are needed to replace /etc/init.d/functions supplied by initscripts (systemv) +# They are not the same code! +# +RDEPENDS_${PN} = "bash coreutils net-tools module-init-tools e2fsprogs chkconfig glib-2.0 \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','lsbinitscripts','',d)}" ASNEEDED_pn-${PN} = "" PARALLEL_MAKE = "" -- 2.7.4 -- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
