chiark / gitweb /
log: unify log env var prefix
[elogind.git] / src / unit.c
index 229f44c1a97459e17152bca68845bf62af344382..c546035ca1c83e3280d091b615f6fdfd897eb521 100644 (file)
@@ -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))