mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
swap: add swap.target Wants links only when running as system instance
This commit is contained in:
parent
307e85efbb
commit
07c132ffdd
@ -115,7 +115,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)
|
||||
if (!p->noauto && p->handle && s->meta.manager->running_as != MANAGER_SESSION)
|
||||
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user