naccyde / rpms / systemd

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