summaryrefslogtreecommitdiff
path: root/src/core/kmod-setup.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-05-06 18:18:43 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-05-06 18:21:51 +0200
commitd79acc309327f8c0863bd3da8b93d926a1c93ba1 (patch)
tree563a1eb14323f7346bdd0378481c300d6ea9c4ce /src/core/kmod-setup.c
parentf2bf5007a97bf5993128a6e16105005f819b60cf (diff)
bus: don't switch to kdbus if not requested
Whenever systemd is re-executed, it tries to create a system bus via kdbus. If the system did not have kdbus loaded during bootup, but the module is loaded later on manually, this will cause two system buses running (kdbus and dbus-daemon in parallel). This patch makes sure we never try to create kdbus buses if it wasn't explicitly requested on the command-line.
Diffstat (limited to 'src/core/kmod-setup.c')
-rw-r--r--src/core/kmod-setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index c5117b47ee..132c3e866c 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -28,6 +28,7 @@
#include "macro.h"
#include "capability.h"
+#include "bus-util.h"
#include "kmod-setup.h"
#ifdef HAVE_KMOD
@@ -44,10 +45,6 @@ static void systemd_kmod_log(
log_internalv(LOG_DEBUG, 0, file, line, fn, format, args);
REENABLE_WARNING;
}
-
-static bool cmdline_check_kdbus(void) {
- return get_proc_cmdline_key("kdbus", NULL) > 0;
-}
#endif
int kmod_setup(void) {
@@ -69,7 +66,7 @@ int kmod_setup(void) {
{ "unix", "/proc/net/unix", true, NULL },
/* IPC is needed before we bring up any other services */
- { "kdbus", "/sys/fs/kdbus", false, cmdline_check_kdbus },
+ { "kdbus", "/sys/fs/kdbus", false, is_kdbus_wanted },
/* netfilter is needed by networkd, nspawn among others, and cannot be autoloaded */
{ "ip_tables", "/proc/net/ip_tables_names", false, NULL },