summaryrefslogtreecommitdiffstats
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-03 06:57:49 -0700
commit175765fdf30200314d19bc8f11f4ede9b820dad6 (patch)
tree4a11b0e9784a06425d7503918df10877e0651f70
parent89391ee45efdae308b8931f17de583f347fbb1ce (diff)
downloadmeta-openembedded-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.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 6c8a48179..1aacae9a6 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"
55do_install:append() { 55do_install:append() {
56 rm -fr "${D}${localstatedir}/lock" 56 rm -fr "${D}${localstatedir}/lock"
57 rm -fr "${D}${localstatedir}/run" 57 rm -fr "${D}${localstatedir}/run"
58 rmdir "${D}${localstatedir}/log/${BPN}/saflog"
59 rmdir "${D}${localstatedir}/log/${BPN}"
60 rmdir "${D}${localstatedir}/log"
58 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 61 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
59 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" 62 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
60 if [ ! -d "${D}${sysconfdir}/init.d" ]; then 63 if [ ! -d "${D}${sysconfdir}/init.d" ]; then
61 install -d ${D}${sysconfdir}/init.d 64 install -d ${D}${sysconfdir}/init.d
62 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ 65 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
63 fi 66 fi
67
68 # Create /var/log/opensaf/saflog in runtime.
69 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
70 install -d ${D}${nonarch_libdir}/tmpfiles.d
71 echo "d ${localstatedir}/log/${BPN}/saflog - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
72 fi
73 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
74 install -d ${D}${sysconfdir}/default/volatiles
75 echo "d root root 0755 ${localstatedir}/log/${BPN}/saflog none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
76 fi
64} 77}
65 78
66FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service" 79FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
80FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
67FILES:${PN}-dev += "${libdir}/libopensaf_core.so" 81FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
68FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a" 82FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
69 83