summaryrefslogtreecommitdiff
path: root/src/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/job.c b/src/job.c
index 98c94e43b0..7b20987c4a 100644
--- a/src/job.c
+++ b/src/job.c
@@ -271,7 +271,7 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) {
case JOB_STOP:
return
b == UNIT_INACTIVE ||
- b == UNIT_MAINTENANCE;
+ b == UNIT_FAILED;
case JOB_VERIFY_ACTIVE:
return
@@ -417,7 +417,7 @@ int job_run_and_invalidate(Job *j) {
case JOB_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
- if (t == UNIT_INACTIVE || t == UNIT_MAINTENANCE || t == UNIT_ACTIVATING) {
+ if (t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_ACTIVATING) {
j->type = JOB_START;
r = unit_start(j->unit);
} else
@@ -427,7 +427,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_MAINTENANCE || t == UNIT_DEACTIVATING)
+ if (t == UNIT_INACTIVE || t == UNIT_FAILED || t == UNIT_DEACTIVATING)
r = -ENOEXEC;
else if (t == UNIT_ACTIVATING) {
j->type = JOB_START;