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 | |
parent | 6e8b34a46a285da1a041946b43e5ef0aa48fc057 (diff) | |
download | meta-openembedded-9e3a740c56fe460e5c454cfcab2ad9476a28323f.tar.gz |
hiawatha: Create /var/log /var/run at runtime
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-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 f66ec7d73..f13f144fc 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() { | |||
50 | install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system | 50 | install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system |
51 | fi | 51 | fi |
52 | 52 | ||
53 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" "${D}${localstatedir}/run" | 53 | # /var/log/hiawatha and /var/lib/hiawatha needs to be created in runtime. |
54 | # Use rmdir to catch if upstream stops creating these dirs, or adds | ||
55 | # something else in /var/log. | ||
56 | rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log | ||
57 | rmdir ${D}${localstatedir}/run | ||
58 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} | ||
59 | |||
60 | # Create /var/log/hiawatha at runtime. | ||
61 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then | ||
62 | install -d ${D}${nonarch_libdir}/tmpfiles.d | ||
63 | echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf | ||
64 | fi | ||
65 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then | ||
66 | install -d ${D}${sysconfdir}/default/volatiles | ||
67 | echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} | ||
68 | fi | ||
69 | |||
54 | } | 70 | } |
55 | 71 | ||
56 | CONFFILES:${PN} = " \ | 72 | CONFFILES:${PN} = " \ |
@@ -61,4 +77,5 @@ CONFFILES:${PN} = " \ | |||
61 | ${sysconfdir}/hiawatha/php-fcgi.conf \ | 77 | ${sysconfdir}/hiawatha/php-fcgi.conf \ |
62 | " | 78 | " |
63 | 79 | ||
80 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" | ||
64 | FILES:${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}" | 81 | FILES:${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}" |