chiark / gitweb /
status: show status messages unconditionally if plymouth is around
[elogind.git] / src / unit.c
index 6f10f51fbd2e2ebdacdd1cdd9b6feb52a0b23de8..b68464922401885afb73a4b9e47c1f5731b5d419 100644 (file)
@@ -1211,7 +1211,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
                         retroactively_stop_dependencies(u);
         }
 
-        if (ns != os && ns == UNIT_FAILED) {
+        if (ns != os && ns == UNIT_FAILED && u->meta.manager->n_deserializing <= 0) {
                 log_notice("Unit %s entered failed state.", u->meta.id);
                 unit_trigger_on_failure(u);
         }
@@ -2180,6 +2180,8 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
                                 log_debug("Failed to parse condition result value %s", v);
                         else
                                 u->meta.condition_result = b;
+
+                        continue;
                 }
 
                 if ((r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds)) < 0)
@@ -2231,7 +2233,7 @@ int unit_coldplug(Unit *u) {
                         return r;
 
         if (u->meta.deserialized_job >= 0) {
-                if ((r = manager_add_job(u->meta.manager, u->meta.deserialized_job, u, JOB_FAIL, false, NULL, NULL)) < 0)
+                if ((r = manager_add_job(u->meta.manager, u->meta.deserialized_job, u, JOB_IGNORE_DEPENDENCIES, false, NULL, NULL)) < 0)
                         return r;
 
                 u->meta.deserialized_job = _JOB_TYPE_INVALID;
@@ -2252,7 +2254,10 @@ void unit_status_printf(Unit *u, const char *format, ...) {
         if (u->meta.manager->running_as != MANAGER_SYSTEM)
                 return;
 
-        if (!u->meta.manager->show_status)
+        /* If Plymouth is running make sure we show the status, so
+         * that there's something nice to see when people press Esc */
+
+        if (!u->meta.manager->show_status && !plymouth_running())
                 return;
 
         if (!manager_is_booting_or_shutting_down(u->meta.manager))