]> err.no Git - systemd/commitdiff
unit: don't cancel dependent jobs if a stopped daemon returned an error code
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Jul 2010 00:15:38 +0000 (02:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Jul 2010 00:21:41 +0000 (02:21 +0200)
src/job.c
src/unit.c

index 2199d75f6092df0a4bc232f2ca07dc8080f6c667..0a9ce153f697a9521b5b53efd32d51ee19d9b1f8 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -484,7 +484,7 @@ int job_finish_and_invalidate(Job *j, bool success) {
         job_free(j);
 
         if (!success)
-                unit_status_printf(u, "Starting %s... " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u));
+                unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u));
 
         /* Fail depending jobs on failure */
         if (!success) {
index 701dbc0952f8e561a2dc30fd8041c2d70d7ed416..4810d2b9f43d72e544809494504f8766072f54d7 100644 (file)
@@ -1020,10 +1020,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
                 case JOB_RESTART:
                 case JOB_TRY_RESTART:
 
-                        if (ns == UNIT_INACTIVE)
+                        if (ns == UNIT_INACTIVE || ns == UNIT_MAINTENANCE)
                                 job_finish_and_invalidate(u->meta.job, true);
-                        else if (ns == UNIT_MAINTENANCE)
-                                job_finish_and_invalidate(u->meta.job, false);
                         else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) {
                                 unexpected = true;
                                 job_finish_and_invalidate(u->meta.job, false);