mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-28 17:47:05 +03:00
unit: pull in logger unit only when running in system mode
This commit is contained in:
parent
01d67b43b0
commit
ffd73e3599
@ -567,11 +567,8 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
|||||||
/* If syslog or kernel logging is requested, make sure our own
|
/* If syslog or kernel logging is requested, make sure our own
|
||||||
* logging daemon is run first. */
|
* 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 (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 r;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user