From: Zbigniew Jędrzejewski-Szmek Date: Thu, 2 Oct 2014 04:11:36 +0000 (-0400) Subject: core/swap: only make configured units part of swap.target X-Git-Tag: v217~384 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=3018d31238caabc2e204aa161e647dc1c1b5d1c6;hp=3018d31238caabc2e204aa161e647dc1c1b5d1c6 core/swap: only make configured units part of swap.target We used to make all .swap units either RequiredBy=swap.target or WantedBy=swap.target. But swap.target should be the "configured swap units", either through /etc/fstab or non-generated .swap units. It is surprising when systemd starts treating a swap device that was possibly temporarily enabled as a hard dependency for other units. So do not add dependencies with swap.target for units gleaned from /proc/swaps. Similarly, we added dependencies for all aliases of the device name, which clutters up the dependency graph but does not seem to bring any value, since the status of those following units is consistent with the main one anyway. This should be a fix for [1], and it seems the right thing to do anyway. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1114786 ---