summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-28 18:48:42 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-28 18:48:42 +0100
commit3282591dc30b2934a895c7403d2f0b0690260947 (patch)
tree68fef5b38a9b448fcdcd8e48be65daa38470acc7 /src/core/unit.c
parent2fcee0a59a48a1381bb4c0ecf5a2dcbb1015341e (diff)
core: make sure "systemctl reload-or-try-restart is actually a noop if a unit is not running
This makes sure we follow the same basic logic for try-restart if we have a try-reload. Fixes #688
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 32267d95f5..b6fbf4e785 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1894,6 +1894,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
case JOB_RELOAD:
case JOB_RELOAD_OR_START:
+ case JOB_TRY_RELOAD:
if (u->job->state == JOB_RUNNING) {
if (ns == UNIT_ACTIVE)
@@ -2107,6 +2108,7 @@ bool unit_job_is_applicable(Unit *u, JobType j) {
return unit_can_start(u);
case JOB_RELOAD:
+ case JOB_TRY_RELOAD:
return unit_can_reload(u);
case JOB_RELOAD_OR_START: