diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-11-02 19:51:44 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-03 06:57:49 -0700 |
commit | 175765fdf30200314d19bc8f11f4ede9b820dad6 (patch) | |
tree | 4a11b0e9784a06425d7503918df10877e0651f70 | |
parent | 89391ee45efdae308b8931f17de583f347fbb1ce (diff) | |
download | meta-openembedded-contrib-175765fdf30200314d19bc8f11f4ede9b820dad6.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.bb | 14 |
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" |