chiark / gitweb /
systemd: treat reload failure as failure
[elogind.git] / src / core / unit.c
index 50db86c42441727e54b81d45ce2e70b5a31e33c4..81d21622d08f50cc146250757d408fc0e2fada94 100644 (file)
@@ -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) {