|
Zbigniew Jędrzejewski-Szmek |
399a2a |
From 4acdc3835b2c9d395f1df95bb1dd5620a4a0e7e5 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
From: Michael Biebl <biebl@debian.org>
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
Date: Sat, 14 Mar 2015 16:48:54 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
Subject: [PATCH] service: don't add After= dependencies on .busname units if
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
kdbus support is disabled
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
(cherry picked from commit 6962fd3bd28cb5d3aaff69c1e3b6cc006e7c8426)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
---
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
src/core/service.c | 8 +++++---
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
diff --git a/src/core/service.c b/src/core/service.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
index 7781b4e626..ae5e610008 100644
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
--- a/src/core/service.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+++ b/src/core/service.c
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
@@ -556,14 +556,16 @@ static int service_add_extras(Service *s) {
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
s->notify_access = NOTIFY_MAIN;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
if (s->bus_name) {
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+#ifdef ENABLE_KDBUS
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
const char *n;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
- r = unit_watch_bus_name(UNIT(s), s->bus_name);
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+ n = strjoina(s->bus_name, ".busname");
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+ r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+#endif
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
- n = strjoina(s->bus_name, ".busname");
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
- r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
+ r = unit_watch_bus_name(UNIT(s), s->bus_name);
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
399a2a |
}
|