summaryrefslogtreecommitdiff
path: root/src/swap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-19 03:15:59 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-19 03:15:59 +0200
commita3d4e06dfa234bf2a9398c8e534b705b68aa50a1 (patch)
tree41d9a99c9827fa9fac302c15c382ae6dc941a40c /src/swap.c
parent5e8d1c9a9f15b7453474dc4879bdb4021c3f50a1 (diff)
manager: get rid of destinction between running_as=system and running_as=init, as there is little value in it and we cannot really test this
Diffstat (limited to 'src/swap.c')
-rw-r--r--src/swap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/swap.c b/src/swap.c
index 5b3073bd4a..501a1d96c8 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -116,7 +116,7 @@ static int swap_add_target_links(Swap *s) {
if ((r = manager_load_unit(s->meta.manager, SPECIAL_SWAP_TARGET, NULL, &tu)) < 0)
return r;
- if (!p->noauto && p->handle && s->meta.manager->running_as != MANAGER_SESSION)
+ if (!p->noauto && p->handle && s->meta.manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
return r;
@@ -180,9 +180,7 @@ static int swap_load(Unit *u) {
if ((r = unit_set_description(u, s->what)) < 0)
return r;
- if ((r = unit_add_node_link(u, s->what,
- (u->meta.manager->running_as == MANAGER_INIT ||
- u->meta.manager->running_as == MANAGER_SYSTEM))) < 0)
+ if ((r = unit_add_node_link(u, s->what, u->meta.manager->running_as == MANAGER_SYSTEM)) < 0)
return r;
if ((r = swap_add_mount_links(s)) < 0)