summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 86aaa1509a..3a88996eb7 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -616,9 +616,11 @@ 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 (u->manager->running_as == SYSTEMD_SYSTEM)
- if ((r = unit_add_two_dependencies_by_name(u, UNIT_REQUIRES, UNIT_AFTER, SPECIAL_JOURNALD_SOCKET, NULL, true)) < 0)
+ if (u->manager->running_as == SYSTEMD_SYSTEM) {
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_JOURNALD_SOCKET, NULL, true);
+ if (r < 0)
return r;
+ }
return 0;
}