diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-01 00:31:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-01 00:31:53 +0200 |
commit | 6124958c7bda3fed9b079e8217781480797703f5 (patch) | |
tree | 7e5b47c29fa4c7cfe24c7798091d3561e3231cca /src/job.c | |
parent | 4fd5948e74b776b6d68ba55f558da5f354179e52 (diff) |
unit: add new abstracted maintenance state for units
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -279,7 +279,8 @@ bool job_type_is_redundant(JobType a, UnitActiveState b) { case JOB_STOP: return - b == UNIT_INACTIVE; + b == UNIT_INACTIVE || + b == UNIT_INACTIVE_MAINTENANCE; case JOB_VERIFY_ACTIVE: 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_INACTIVE_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_INACTIVE_MAINTENANCE || t == UNIT_DEACTIVATING) r = -ENOEXEC; else if (t == UNIT_ACTIVATING) { j->type = JOB_START; |