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