From: Michal Sekletar Date: Wed, 1 Nov 2017 09:25:48 +0000 (-0700) Subject: manager: fix connecting to bus when dbus is actually around (#7205) X-Git-Tag: v236~273 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41dfa61d35c51a584437481d20541d5c3ccfa93d;p=thirdparty%2Fsystemd.git manager: fix connecting to bus when dbus is actually around (#7205) manager_connect_bus() is called *before* manager_coldplug(). As a last thing in service_coldplug() we set service state to s->deserialized_state, and thus before we do that all services are inactive and try_connect always evaluates to false. To fix that we must look at deserialized state instead of current unit state. Fixes #7146 --- diff --git a/src/core/manager.c b/src/core/manager.c index 3643deb0492..d501182f22c 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -934,7 +934,7 @@ static int manager_connect_bus(Manager *m, bool reexecuting) { u = manager_get_unit(m, SPECIAL_DBUS_SERVICE); try_bus_connect = - (u && UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u))) && + (u && SERVICE(u)->deserialized_state == SERVICE_RUNNING) && (reexecuting || (MANAGER_IS_USER(m) && getenv("DBUS_SESSION_BUS_ADDRESS")));