From: Lennart Poettering Date: Thu, 7 Apr 2011 16:47:11 +0000 (+0200) Subject: unit: pull in logger unit only when running in system mode X-Git-Tag: v25~81 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffd73e3599ea2a97c03c1765cd4bc94ebc152f89;p=systemd unit: pull in logger unit only when running in system mode --- diff --git a/src/unit.c b/src/unit.c index 90773e89..e5a96235 100644 --- a/src/unit.c +++ b/src/unit.c @@ -567,11 +567,8 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) { /* If syslog or kernel logging is requested, make sure our own * logging daemon is run first. */ - 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_SYSTEM) - if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0) + if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_LOGGER_SOCKET, NULL, true)) < 0) return r; return 0;