diff options
author | Thomas Bächler <thomas@archlinux.org> | 2012-10-06 01:11:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-10-16 02:20:55 +0200 |
commit | fd59a381e35edfbeb868143d76181be60df9c22b (patch) | |
tree | d7af2635aedc5978e989e7a23d80bf403486cfe4 /src/core | |
parent | 6bae23a0388dd077fee99e83e161d297c3e2b768 (diff) |
core/swap.c: Do not add Before=swap.target to swap units.
The fstab generator adds Before=swap.target by default, and when creating
a custom .swap unit, you can also add Before=swap.target to the unit.
However, it is impossible to not have this ordering dependency right now.
Virtually all existing setups likely use the fstab generator, so this
change is unlikely to break anything.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/swap.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/core/swap.c b/src/core/swap.c index b4f53b7248..c708b7fefa 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -165,22 +165,6 @@ static int swap_add_mount_links(Swap *s) { return 0; } -static int swap_add_target_links(Swap *s) { - Unit *tu; - int r; - - assert(s); - - if (!s->from_fragment) - return 0; - - r = manager_load_unit(UNIT(s)->manager, SPECIAL_SWAP_TARGET, NULL, NULL, &tu); - if (r < 0) - return r; - - return unit_add_dependency(UNIT(s), UNIT_BEFORE, tu, true); -} - static int swap_add_device_links(Swap *s) { SwapParameters *p; @@ -291,9 +275,6 @@ static int swap_load(Unit *u) { if ((r = swap_add_mount_links(s)) < 0) return r; - if ((r = swap_add_target_links(s)) < 0) - return r; - if ((r = unit_add_default_cgroups(u)) < 0) return r; |