mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
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>
This commit is contained in:
committed by
Khem Raj
parent
89391ee45e
commit
175765fdf3
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user