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
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")));