Hey,

use the systemd plymouth pid file detection to only try to send messages to plymouth if present. This prevent some warning spams which may confuse users as in https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1429171

Cheers,
Didier
>From 9ad48f85f7acc18fe1b5782058a8bb58014a3d16 Mon Sep 17 00:00:00 2001
From: Didier Roche <didro...@ubuntu.com>
Date: Mon, 9 Mar 2015 13:44:39 +0100
Subject: [PATCH] Fsckd: only connect to plymouth if running

Ensure that we are not trying to send plymouth messages if the plymouth pid
file is not present.
---
 src/fsckd/fsckd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
index 834476c..4362e10 100644
--- a/src/fsckd/fsckd.c
+++ b/src/fsckd/fsckd.c
@@ -238,9 +238,11 @@ static int update_global_progress(Manager *m) {
                 }
 
                 /* try to connect to plymouth and send message */
-                r = send_message_plymouth(m, fsck_message);
-                if (r < 0)
-                        log_debug("Couldn't send message to plymouth");
+                if (plymouth_running()) {
+                        r = send_message_plymouth(m, fsck_message);
+                        if (r < 0)
+                                log_debug("Couldn't send message to plymouth");
+                }
 
                 if (l > m->clear)
                         m->clear = l;
-- 
2.1.4

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to