summaryrefslogtreecommitdiff
path: root/src/fsckd
diff options
context:
space:
mode:
authorDidier Roche <didrocks@ubuntu.com>2015-03-10 10:05:19 +0100
committerTom Gundersen <teg@jklm.no>2015-03-16 18:30:20 +0100
commite26169bd48c64753510a1194abdf4fb5dc907123 (patch)
tree0d3b60c69b0e4d67461cee39000e4ac1262e96a2 /src/fsckd
parent186c9f993af7d9c643cccd7ee8f202f4df949cde (diff)
fsckd: check if plymouth is running before attempting connection
Diffstat (limited to 'src/fsckd')
-rw-r--r--src/fsckd/fsckd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
index f24715cee3..6b35fc26a2 100644
--- a/src/fsckd/fsckd.c
+++ b/src/fsckd/fsckd.c
@@ -231,9 +231,12 @@ static int manager_connect_plymouth(Manager *m) {
union sockaddr_union sa = PLYMOUTH_SOCKET;
int r;
+ if (!plymouth_running())
+ return 0;
+
/* try to connect or reconnect if sending a message */
if (m->plymouth_fd >= 0)
- return 0;
+ return 1;
m->plymouth_fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0);
if (m->plymouth_fd < 0)
@@ -278,6 +281,9 @@ static int manager_send_plymouth_message(Manager *m, const char *message) {
r = manager_connect_plymouth(m);
if (r < 0)
return r;
+ /* 0 means that plymouth isn't running, do not send any message yet */
+ else if (r == 0)
+ return 0;
if (!m->plymouth_cancel_sent) {