]> code.ossystems Code Review - openembedded-core.git/commitdiff
volatile-binds: correct some errors reported by systemd
authorJoe Slater <jslater@windriver.com>
Fri, 31 Mar 2017 01:06:33 +0000 (18:06 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 Mar 2017 11:10:21 +0000 (12:10 +0100)
systemd-tmpfiles-setup will fail at boot, so we suppress
the default versions of etc.conf and home.conf.

We also make sure that /var/{cache,spool} and /srv are writeable
if they exist.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/volatile-binds/volatile-binds.bb

index f07458acc0224d310912e2fa626040c85b68241d..a6e32549301d1b75e464ea5502b93c624fd1d2f3 100644 (file)
@@ -17,6 +17,9 @@ REQUIRED_DISTRO_FEATURES = "systemd"
 
 VOLATILE_BINDS ?= "\
     /var/volatile/lib /var/lib\n\
+    /var/volatile/cache /var/cache\n\
+    /var/volatile/spool /var/spool\n\
+    /var/volatile/srv /srv\n\
 "
 VOLATILE_BINDS[type] = "list"
 VOLATILE_BINDS[separator] = "\n"
@@ -67,5 +70,11 @@ do_install () {
     for service in ${SYSTEMD_SERVICE_volatile-binds}; do
         install -m 0644 $service ${D}${systemd_unitdir}/system/
     done
+
+    # Suppress attempts to process some tmpfiles that are not temporary.
+    #
+    install -d ${D}${sysconfdir}/tmpfiles.d ${D}/var/cache
+    ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf
+    ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf
 }
 do_install[dirs] = "${WORKDIR}"