diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-11-02 19:51:43 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-03 06:57:49 -0700 |
commit | 89391ee45efdae308b8931f17de583f347fbb1ce (patch) | |
tree | c5eb5b645c21321f10d6ac83acdd0c73bffb15f5 /meta-oe/dynamic-layers/meta-python | |
parent | 563577f4882c3a1ccb96d92e3c85a1eb3fba0bb9 (diff) | |
download | meta-openembedded-contrib-89391ee45efdae308b8931f17de583f347fbb1ce.tar.gz |
mongodb: Create /var/log/mongodb 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>
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 461a1d0079..1b11bd4dca 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -113,11 +113,19 @@ scons_do_install() { install -m 755 -d ${D}${localstatedir}/lib/${BPN} chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN} - # Log files - install -m 755 -d ${D}${localstatedir}/log/${BPN} - chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN} + # Create /var/log/mongodb in runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${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 ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi } CONFFILES:${PN} = "${sysconfdir}/mongod.conf" SYSTEMD_SERVICE:${PN} = "mongod.service" + +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |