diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-11-03 23:28:48 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-04 06:52:51 -0700 |
commit | 9e3a740c56fe460e5c454cfcab2ad9476a28323f (patch) | |
tree | c61708d2853bacb8647ab7ea938e3816ac02a7f6 /meta-webserver/recipes-httpd | |
parent | 6e8b34a46a285da1a041946b43e5ef0aa48fc057 (diff) | |
download | meta-openembedded-contrib-9e3a740c56fe460e5c454cfcab2ad9476a28323f.tar.gz |
hiawatha: Create /var/log /var/run at runtime
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd')
-rw-r--r-- | meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb index f66ec7d736..f13f144fcc 100644 --- a/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb +++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.12.bb @@ -50,7 +50,23 @@ do_install:append() { install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system fi - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" "${D}${localstatedir}/run" + # /var/log/hiawatha and /var/lib/hiawatha needs to be created in runtime. + # Use rmdir to catch if upstream stops creating these dirs, or adds + # something else in /var/log. + rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log + rmdir ${D}${localstatedir}/run + rmdir --ignore-fail-on-non-empty ${D}${localstatedir} + + # Create /var/log/hiawatha at runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${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 root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi + } CONFFILES:${PN} = " \ @@ -61,4 +77,5 @@ CONFFILES:${PN} = " \ ${sysconfdir}/hiawatha/php-fcgi.conf \ " +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" FILES:${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}" |