diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-05-06 18:18:43 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-05-06 18:21:51 +0200 |
commit | d79acc309327f8c0863bd3da8b93d926a1c93ba1 (patch) | |
tree | 563a1eb14323f7346bdd0378481c300d6ea9c4ce /src/dbus1-generator | |
parent | f2bf5007a97bf5993128a6e16105005f819b60cf (diff) | |
download | systemd-d79acc309327f8c0863bd3da8b93d926a1c93ba1.tar.gz |
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/dbus1-generator')
-rw-r--r-- | src/dbus1-generator/dbus1-generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus1-generator/dbus1-generator.c b/src/dbus1-generator/dbus1-generator.c index c909a4b1da..4980fccc31 100644 --- a/src/dbus1-generator/dbus1-generator.c +++ b/src/dbus1-generator/dbus1-generator.c @@ -302,7 +302,7 @@ int main(int argc, char *argv[]) { umask(0022); - if (access("/sys/fs/kdbus/control", F_OK) < 0) + if (!is_kdbus_available()) return 0; r = cg_pid_get_owner_uid(0, NULL); @@ -310,7 +310,7 @@ int main(int argc, char *argv[]) { path = "/usr/share/dbus-1/services"; type = "session"; units = USER_DATA_UNIT_PATH; - } else if (r == -ENOENT) { + } else if (r == -ENXIO) { path = "/usr/share/dbus-1/system-services"; type = "system"; units = SYSTEM_DATA_UNIT_PATH; |