Skip to contentSkip to conversation

volatile-binds: correct some errors reported by systemd

PATCH New Joe Slater 1 participant 1 message Mar 30, 2017

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 volatile-binds: correct some errors reported by systemd

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.

---
 meta/recipes-core/volatile-binds/volatile-binds.bb |    9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-core/volatile-binds/volatile-binds.bb +9 -0
index fee7275..130ab55 100644
@@ -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}"
Signature · 1 line
1.7.9.5