From 297720787f914ca34f2d04c66980c18c57700865 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 20 Feb 2012 11:30:03 -0600 Subject: swap: go back to using swapon for Linux systems There are several reasons for going back to this: - fstabinfo doesn't work with labels in fstab - when a device is passed to swapon individually, the swap priority from fstab is not honored. - We also add the -e option to only activate available swap devices. reported-by: Duncan <1i5t5.duncan@cox.net> X-Gentoo-Bug: 405021 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=405021 --- init.d/swap.in | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/init.d/swap.in b/init.d/swap.in index 0b229a1..fa08b4d 100644 --- a/init.d/swap.in +++ b/init.d/swap.in @@ -12,15 +12,7 @@ start() { ebegin "Activating swap devices" case "$RC_UNAME" in - Linux) - local dev - for dev in $(fstabinfo -b -t swap); do - case "$dev" in - /dev/loop*) ;; - *) swapon $dev >/dev/null;; - esac - done - ;; + Linux) swapon -a -e >/dev/null;; NetBSD|OpenBSD) swapctl -A -t noblk >/dev/null;; *) swapon -a >/dev/null;; esac -- cgit v1.2.3