On Thu, 20.06.13 13:36, Auke Kok ([email protected]) wrote: Applied, with some coding style fixes.
> Cc: [email protected] > Cc: [email protected] > --- > src/core/manager.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/src/core/manager.c b/src/core/manager.c > index f16621a..592f332 100644 > --- a/src/core/manager.c > +++ b/src/core/manager.c > @@ -509,9 +509,14 @@ int manager_new(SystemdRunningAs running_as, Manager > **_m) { > goto fail; > > /* Try to connect to the busses, if possible. */ > - r = bus_init(m, running_as != SYSTEMD_SYSTEM); > - if (r < 0) > - goto fail; > + if (((running_as == SYSTEMD_USER) && > (getenv("DBUS_SESSION_BUS_ADDRESS"))) || > + (running_as == SYSTEMD_SYSTEM)) { > + r = bus_init(m, running_as != SYSTEMD_SYSTEM); > + if (r < 0) > + goto fail; > + } else { > + log_debug("Skipping DBus session bus connection attempt - no > DBUS_SESSION_BUS_ADDRESS set..."); > + } > > m->taint_usr = dir_is_empty("/usr") > 0; > Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
