X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjob.c;h=31e9cfe8d6f937ddf7973548c599f2c0d64283cb;hb=f295f5c0c0a31afd1914adf5d8a4d7f51e8e0be0;hp=78fe136328500a4ab29af7c438966112a394d8da;hpb=7535cc788e37afaf9904d0ee8e2b98f1cb3a4cbd;p=elogind.git diff --git a/src/job.c b/src/job.c index 78fe13632..31e9cfe8d 100644 --- a/src/job.c +++ b/src/job.c @@ -275,25 +275,26 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) { case JOB_START: return b == UNIT_ACTIVE || - b == UNIT_ACTIVE_RELOADING; + b == UNIT_RELOADING; case JOB_STOP: return - b == UNIT_INACTIVE; + b == UNIT_INACTIVE || + b == UNIT_MAINTENANCE; case JOB_VERIFY_ACTIVE: return b == UNIT_ACTIVE || - b == UNIT_ACTIVE_RELOADING; + b == UNIT_RELOADING; case JOB_RELOAD: return - b == UNIT_ACTIVE_RELOADING; + b == UNIT_RELOADING; case JOB_RELOAD_OR_START: return b == UNIT_ACTIVATING || - b == UNIT_ACTIVE_RELOADING; + b == UNIT_RELOADING; case JOB_RESTART: return @@ -415,7 +416,7 @@ int job_run_and_invalidate(Job *j) { case JOB_RESTART: { UnitActiveState t = unit_active_state(j->unit); - if (t == UNIT_INACTIVE || t == UNIT_ACTIVATING) { + if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_ACTIVATING) { j->type = JOB_START; r = unit_start(j->unit); } else @@ -425,7 +426,7 @@ int job_run_and_invalidate(Job *j) { case JOB_TRY_RESTART: { UnitActiveState t = unit_active_state(j->unit); - if (t == UNIT_INACTIVE || t == UNIT_DEACTIVATING) + if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_DEACTIVATING) r = -ENOEXEC; else if (t == UNIT_ACTIVATING) { j->type = JOB_START;