diff options
author | Kay Sievers <kay@vrfy.org> | 2014-01-06 07:52:17 +0400 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-01-07 01:35:25 +0800 |
commit | fccd44ec3a7abd305b558d39f54b5ef223f00b68 (patch) | |
tree | aa57881d570c15d5724be5c87ec184a2b83ccaae /src/core | |
parent | fcc81ea3616b1108a23c0997331923d052539124 (diff) |
core: --user -- add basic.target an sort against it like --system does
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/service.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/core/service.c b/src/core/service.c index 6fbde2b8f2..23810b39a9 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1138,28 +1138,10 @@ static int service_add_default_dependencies(Service *s) { * majority of services. */ /* First, pull in base system */ - if (UNIT(s)->manager->running_as == SYSTEMD_SYSTEM) { - r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, - SPECIAL_BASIC_TARGET, NULL, true); - if (r < 0) - return r; - - } else if (UNIT(s)->manager->running_as == SYSTEMD_USER) { - r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, - SPECIAL_SOCKETS_TARGET, NULL, true); - if (r < 0) - return r; - - r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, - SPECIAL_TIMERS_TARGET, NULL, true); - if (r < 0) - return r; - - r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, - SPECIAL_PATHS_TARGET, NULL, true); - if (r < 0) - return r; - } + r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, + SPECIAL_BASIC_TARGET, NULL, true); + if (r < 0) + return r; /* Second, activate normal shutdown */ r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, |