summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-02 21:52:51 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-02 22:12:02 -0500
commit6a371e23ee0e47827fb4e3aa469ed84da2599304 (patch)
tree3ce1c39507ad8a9a20a19f52ebb58e424ba27f6b /src/core/unit.c
parentc71ecee578fa2d89d13f11edd7b27001f663bbb5 (diff)
systemd: treat reload failure as failure
systemctl reload "suceeded" on stopped units, but it is documented to fail in this case. https://bugzilla.redhat.com/show_bug.cgi?id=1036845
Notes
Backport: bugfix
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 50db86c42..81d21622d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1301,8 +1301,11 @@ int unit_reload(Unit *u) {
if (state == UNIT_RELOADING)
return -EALREADY;
- if (state != UNIT_ACTIVE)
+ if (state != UNIT_ACTIVE) {
+ log_warning_unit(u->id, "Unit %s cannot be reloaded because it is inactive.",
+ u->id);
return -ENOEXEC;
+ }
following = unit_following(u);
if (following) {