summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-11-03 10:14:00 +0100
committerKhem Raj <raj.khem@gmail.com>2021-11-04 06:52:50 -0700
commitfce137d50bdcac563effd5d5acc77ba3e28d8aaa (patch)
tree6419e0e55cd8433da6ecb1630bdc56db127dfc47 /meta-networking
parentb402a3076fbafe05d0b8621e50603b65c3fe8147 (diff)
downloadmeta-openembedded-fce137d50bdcac563effd5d5acc77ba3e28d8aaa.tar.gz
opensaf: Make sure a file needed by opensafd.service is not removed
Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass if sysvinit is not in DISTRO_FEATURES. Note that this will not actually make the initscript and service file work since they depend on /lib/lsb/init-functions, which does not exist since the lsb recipe was removed from OE-Core. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
index 1aacae9a6..c24fccf04 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
@@ -60,10 +60,14 @@ do_install:append() {
60 rmdir "${D}${localstatedir}/log" 60 rmdir "${D}${localstatedir}/log"
61 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 61 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
62 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" 62 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
63 if [ ! -d "${D}${sysconfdir}/init.d" ]; then 63
64 install -d ${D}${sysconfdir}/init.d 64 # Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is
65 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ 65 # needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass
66 fi 66 # if sysvinit is not in DISTRO_FEATURES.
67 mv ${D}${sysconfdir}/init.d/opensafd ${D}${libdir}/${BPN}/opensafd-init
68 ln -srf ${D}${libdir}/${BPN}/opensafd-init ${D}${sysconfdir}/init.d/opensafd
69 [ ! -f ${D}${systemd_system_unitdir}/opensafd.service ] ||
70 sed -ri -e "s|/etc/init.d/opensafd|${libdir}/${BPN}/opensafd-init|" ${D}${systemd_system_unitdir}/opensafd.service
67 71
68 # Create /var/log/opensaf/saflog in runtime. 72 # Create /var/log/opensaf/saflog in runtime.
69 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then 73 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then