|
|
923a60 |
From 92ff0ade63ae85c6b6170af7b1209aaf37298ab1 Mon Sep 17 00:00:00 2001
|
|
|
923a60 |
From: Jan Synacek <jan.synacek@gmail.com>
|
|
|
923a60 |
Date: Tue, 24 Jan 2017 04:06:05 +0100
|
|
|
923a60 |
Subject: [PATCH] core: improve error message when RefuseManualStart(Stop) is
|
|
|
923a60 |
hit (#5132)
|
|
|
923a60 |
|
|
|
923a60 |
(cherry picked from commit 7e974e8530e3605db8186bd0c33bf36087e24e22)
|
|
|
923a60 |
Resolves: #1026648
|
|
|
923a60 |
---
|
|
|
923a60 |
src/core/dbus-unit.c | 2 +-
|
|
|
923a60 |
src/core/dbus.c | 2 +-
|
|
|
923a60 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
923a60 |
|
|
|
923a60 |
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
|
|
|
923a60 |
index 89b00e94c6..056a17ac1f 100644
|
|
|
923a60 |
--- a/src/core/dbus-unit.c
|
|
|
923a60 |
+++ b/src/core/dbus-unit.c
|
|
|
923a60 |
@@ -843,7 +843,7 @@ int bus_unit_queue_job(
|
|
|
923a60 |
if ((type == JOB_START && u->refuse_manual_start) ||
|
|
|
923a60 |
(type == JOB_STOP && u->refuse_manual_stop) ||
|
|
|
923a60 |
((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop)))
|
|
|
923a60 |
- return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only.", u->id);
|
|
|
923a60 |
+ 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);
|
|
|
923a60 |
|
|
|
923a60 |
r = manager_add_job(u->manager, type, u, mode, true, error, &j);
|
|
|
923a60 |
if (r < 0)
|
|
|
923a60 |
diff --git a/src/core/dbus.c b/src/core/dbus.c
|
|
|
923a60 |
index 29524d49a3..0061211faa 100644
|
|
|
923a60 |
--- a/src/core/dbus.c
|
|
|
923a60 |
+++ b/src/core/dbus.c
|
|
|
923a60 |
@@ -187,7 +187,7 @@ static int signal_activation_request(sd_bus *bus, sd_bus_message *message, void
|
|
|
923a60 |
goto failed;
|
|
|
923a60 |
|
|
|
923a60 |
if (u->refuse_manual_start) {
|
|
|
923a60 |
- r = sd_bus_error_setf(&error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, %s may be requested by dependency only.", u->id);
|
|
|
923a60 |
+ 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);
|
|
|
923a60 |
goto failed;
|
|
|
923a60 |
}
|
|
|
923a60 |
|