Revert "swap: go back to using swapon for Linux systems"

This reverts commit 297720787f.

robbat2 tells me there is a better way to fix this.
This commit is contained in:
William Hubbs 2012-02-20 11:51:08 -06:00
parent 297720787f
commit 06d6701785

View File

@ -12,7 +12,15 @@ start()
{ {
ebegin "Activating swap devices" ebegin "Activating swap devices"
case "$RC_UNAME" in case "$RC_UNAME" in
Linux) swapon -a -e >/dev/null;; Linux)
local dev
for dev in $(fstabinfo -b -t swap); do
case "$dev" in
/dev/loop*) ;;
*) swapon $dev >/dev/null;;
esac
done
;;
NetBSD|OpenBSD) swapctl -A -t noblk >/dev/null;; NetBSD|OpenBSD) swapctl -A -t noblk >/dev/null;;
*) swapon -a >/dev/null;; *) swapon -a >/dev/null;;
esac esac