diff options
author | William Hubbs <williamh@gentoo.org> | 2012-02-20 11:51:08 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-02-20 11:51:08 -0600 |
commit | 06d67017850e106f14d8948003027612253b143a (patch) | |
tree | 7d1bebfec4da0690bf0e34fa11fdaabe8357cf2b | |
parent | 297720787f914ca34f2d04c66980c18c57700865 (diff) |
Revert "swap: go back to using swapon for Linux systems"
This reverts commit 297720787f914ca34f2d04c66980c18c57700865.
robbat2 tells me there is a better way to fix this.
-rw-r--r-- | init.d/swap.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/init.d/swap.in b/init.d/swap.in index fa08b4d0..0b229a1c 100644 --- a/init.d/swap.in +++ b/init.d/swap.in @@ -12,7 +12,15 @@ start() { ebegin "Activating swap devices" 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;; *) swapon -a >/dev/null;; esac |