diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-03-25 21:20:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-03-25 21:28:30 +0100 |
commit | e3d84721dc9bcf9008f72dae03ff0f7842d0bb4b (patch) | |
tree | 2f62446a9d8961872060346793f788e3cac366fd /src/core/socket.c | |
parent | 1b036593b76614dd05942a78120c151161cccc0f (diff) |
units: introduce new timers.target and paths.target to hook timer/path units into for boot
Diffstat (limited to 'src/core/socket.c')
-rw-r--r-- | src/core/socket.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index a3e3631dac..31f4bf49b6 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -331,11 +331,13 @@ static int socket_add_default_dependencies(Socket *s) { int r; assert(s); - if (UNIT(s)->manager->running_as == SYSTEMD_SYSTEM) { - if ((r = unit_add_dependency_by_name(UNIT(s), UNIT_BEFORE, SPECIAL_SOCKETS_TARGET, NULL, true)) < 0) - return r; + r = unit_add_dependency_by_name(UNIT(s), UNIT_BEFORE, SPECIAL_SOCKETS_TARGET, NULL, true); + if (r < 0) + return r; - if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0) + if (UNIT(s)->manager->running_as == SYSTEMD_SYSTEM) { + r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true); + if (r < 0) return r; } |