summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Synacek <jan.synacek@gmail.com>2017-01-24 04:06:05 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-23 22:06:05 -0500
commit7e974e8530e3605db8186bd0c33bf36087e24e22 (patch)
treee93c155092e4eca0ab85941d9206c69eea214d1e
parent29e6561f89ea21f10e0ce48f8d69f4dd21492dee (diff)
core: improve error message when RefuseManualStart(Stop) is hit (#5132)
-rw-r--r--src/core/dbus-unit.c2
-rw-r--r--src/core/dbus.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 2adc1d9288..60e889e1ef 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -1218,7 +1218,7 @@ int bus_unit_queue_job(
(type == JOB_STOP && u->refuse_manual_stop) ||
((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop)) ||
(type == JOB_RELOAD_OR_START && job_type_collapse(type, u) == JOB_START && u->refuse_manual_start))
- return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only.", u->id);
+ return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only (it is configured to refuse manual start/stop).", u->id);
r = manager_add_job(u->manager, type, u, mode, error, &j);
if (r < 0)
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 07ab21f199..1f9bf2085f 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -175,7 +175,7 @@ static int signal_activation_request(sd_bus_message *message, void *userdata, sd
goto failed;
if (u->refuse_manual_start) {
- r = sd_bus_error_setf(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, %s may be requested by dependency only.", u->id);
+ r = sd_bus_error_setf(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, %s may be requested by dependency only (it is configured to refuse manual start/stop).", u->id);
goto failed;
}