[OE-core] [PATCH V3 2/3] systemd: Verify if journal-flush.service exists.

Bruno Bottazzini bruno.bottazzini at intel.com
Thu May 7 16:40:39 UTC 2015


If the users wants to enable networkd this file will not be generate and the
installation will fail.

Signed-off-by: Bruno Bottazzini <bruno.bottazzini at intel.com>
---
 meta/recipes-core/systemd/systemd_219.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index c196017..b4bff18 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -177,8 +177,11 @@ do_install() {
 	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
 	# its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d
 	# don't order journal flushing afte remote-fs.target
-	sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
-	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+	if [ -s ${D}${systemd_unitdir}/system/systemd-journal-flush.service ]; then
+                # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+                sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service
+        fi
+
 	# for existence else it fails
 	if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then
 		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)}
-- 
2.4.0




More information about the Openembedded-core mailing list