chiark / gitweb /
manager: fix taint check for /usr
[elogind.git] / src / unit.c
index 6f10f51fbd2e2ebdacdd1cdd9b6feb52a0b23de8..a2953a6bcb801abfb5683a4d6c34aac24a08146e 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;