X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Funit.c;h=c546035ca1c83e3280d091b615f6fdfd897eb521;hp=229f44c1a97459e17152bca68845bf62af344382;hb=541d6159c6b82c6786730d70b761d1aefffa8deb;hpb=53ec43c61d2f0e19c41640c63ec034b2f8cedb89 diff --git a/src/unit.c b/src/unit.c index 229f44c1a..c546035ca 100644 --- a/src/unit.c +++ b/src/unit.c @@ -38,6 +38,7 @@ #include "unit-name.h" #include "specifier.h" #include "dbus-unit.h" +#include "special.h" const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = { [UNIT_SERVICE] = &service_vtable, @@ -541,7 +542,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) { if ((r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0) return r; - if (u->meta.manager->running_as != MANAGER_SESSION) + if (u->meta.manager->running_as == MANAGER_SYSTEM) if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0) return r; @@ -1029,8 +1030,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) { /* The bus just might have become available, * hence try to connect to it, if we aren't * yet connected. */ - bus_init_system(u->meta.manager); - bus_init_api(u->meta.manager); + bus_init(u->meta.manager); } if (unit_has_name(u, SPECIAL_SYSLOG_SERVICE))