Patchwork [6/6] systemd: delete files that end up in /var/volatile

login
register
mail settings
Submitter Ross Burton
Date Dec. 18, 2013, 4:20 p.m.
Message ID <1387383607-4005-6-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/63537/
State Accepted
Commit 3d6d5d78479e5703180f5230cf24c335c20a4689
Headers show

Comments

Ross Burton - Dec. 18, 2013, 4:20 p.m.
${localstatedir}/log/journal is created by tmpfiles.d on boot, and the README
just causes warnings that /var/volatile isn't empty when mounting on top of it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/systemd/systemd_208.bb |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-core/systemd/systemd_208.bb b/meta/recipes-core/systemd/systemd_208.bb
index c1f8d77..372e73d 100644
--- a/meta/recipes-core/systemd/systemd_208.bb
+++ b/meta/recipes-core/systemd/systemd_208.bb
@@ -97,9 +97,6 @@  do_install() {
 	ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
 	ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
 
-	# Create dir for journal
-	install -d ${D}${localstatedir}/log/journal
-
 	# Create machine-id
 	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
 	touch ${D}${sysconfdir}/machine-id
@@ -113,6 +110,9 @@  do_install() {
 		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
 		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
 	fi
+
+        # Delete journal README, as log can be symlinked inside volatile.
+        rm -f ${D}/${localstatedir}/log/README
 }
 
 do_install_ptest () {