diff options
Diffstat (limited to 'load-fragment.c')
-rw-r--r-- | load-fragment.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/load-fragment.c b/load-fragment.c index 2757506aba..9273fc8b83 100644 --- a/load-fragment.c +++ b/load-fragment.c @@ -824,7 +824,7 @@ finish: } int unit_load_fragment(Unit *u) { - int r = -ENOENT; + int r = 0; ExecContext *c; assert(u); @@ -851,14 +851,16 @@ int unit_load_fragment(Unit *u) { if (r >= 0 && c && (c->output == EXEC_KERNEL || c->output == EXEC_SYSLOG)) { + int k; + /* If syslog or kernel logging is requested, make sure * our own logging daemon is run first. */ - if ((r = unit_add_dependency(u, UNIT_AFTER, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0) - return r; + if ((k = unit_add_dependency(u, UNIT_AFTER, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0) + return k; - if ((r = unit_add_dependency(u, UNIT_REQUIRES, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0) - return r; + if ((k = unit_add_dependency(u, UNIT_REQUIRES, u->meta.manager->special_units[SPECIAL_LOGGER_SOCKET])) < 0) + return k; } return r; |