aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-11-02 19:51:44 +0100
committerKhem Raj <raj.khem@gmail.com>2021-11-02 13:29:11 -0700
commitbfc86f810f336d6859acc87c089b23615a38e154 (patch)
tree0bb4f4cfedfce4ebcb1fcef81b7fd9e4428764f0
parente01bc3a7219da6c9f32cf33f375346633ad2bbea (diff)
downloadmeta-openembedded-contrib-bfc86f810f336d6859acc87c089b23615a38e154.tar.gz
opensaf: Create /var/log/opensaf/saflog in runtime
/var/log is normally a link to /var/volatile/log and /var/volatile is a tmpfs mount. So anything created in /var/log will not be available when the tmpfs is mounted. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb14
1 files changed, 14 insertions, 0 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 6c8a48179b..1aacae9a6b 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
@@ -55,15 +55,29 @@ LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
do_install:append() {
rm -fr "${D}${localstatedir}/lock"
rm -fr "${D}${localstatedir}/run"
+ rmdir "${D}${localstatedir}/log/${BPN}/saflog"
+ rmdir "${D}${localstatedir}/log/${BPN}"
+ rmdir "${D}${localstatedir}/log"
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
if [ ! -d "${D}${sysconfdir}/init.d" ]; then
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
fi
+
+ # Create /var/log/opensaf/saflog in runtime.
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+ install -d ${D}${nonarch_libdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
+ fi
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
+ fi
}
FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
+FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"