diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-11-03 22:51:23 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-04 06:52:51 -0700 |
commit | 6e8b34a46a285da1a041946b43e5ef0aa48fc057 (patch) | |
tree | d518188825bd3fc179b25d273c704bac8dfb7071 /meta-webserver | |
parent | 3473d942743b7dc2b1d82bf5d3398416e7db6f88 (diff) | |
download | meta-openembedded-contrib-6e8b34a46a285da1a041946b43e5ef0aa48fc057.tar.gz |
monkey: Keep /var/volatile empty
/var/volatile is populated at runtime as it can be mounted from a
different partition, therefore its better to keep it empty and only
populate it during runtime.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r-- | meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb index 1386770c8a..fff406a3f2 100644 --- a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb +++ b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb @@ -17,7 +17,7 @@ UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases" UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \ - -DPID_FILE=${localstatedir}/run/monkey.pid \ + -DPID_FILE=/run/monkey.pid \ -DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \ -DWITH_PLUGINS=* \ -DWITHOUT_PLUGINS=mbedtls \ @@ -38,10 +38,18 @@ inherit cmake pkgconfig update-rc.d systemd OECMAKE_GENERATOR = "Unix Makefiles" do_install:append() { - rm -rf ${D}/run - rm -rf ${D}${localstatedir}/run + rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log + rmdir --ignore-fail-on-non-empty ${D}${localstatedir} install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey - + # Create /var/log/monkey 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 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service fi @@ -56,8 +64,7 @@ PACKAGES += "${PN}-plugins" FILES:${PN}-plugins = "${libdir}/monkey-*.so" -FILES:${PN} += "${localstatedir}/www/monkey/ /run" - +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ ${sysconfdir}/monkey/sites/default \ |