Skip to content

Commit 07c132f

Browse files
committed
swap: add swap.target Wants links only when running as system instance
1 parent 307e85e commit 07c132f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int swap_add_target_links(Swap *s) {
115115
if ((r = manager_load_unit(s->meta.manager, SPECIAL_SWAP_TARGET, NULL, &tu)) < 0)
116116
return r;
117117

118-
if (!p->noauto && p->handle)
118+
if (!p->noauto && p->handle && s->meta.manager->running_as != MANAGER_SESSION)
119119
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
120120
return r;
121121

0 commit comments

Comments
 (0)