aboutsummaryrefslogtreecommitdiff
path: root/init.d/swap.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/swap.in')
-rw-r--r--init.d/swap.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/init.d/swap.in b/init.d/swap.in
index bd20ffec..bdc5dc71 100644
--- a/init.d/swap.in
+++ b/init.d/swap.in
@@ -4,7 +4,7 @@
depend()
{
- need localmount
+ before localmount
keyword -jail -openvz -prefix -vserver -lxc
}
@@ -12,6 +12,15 @@ 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 2>/dev/null;;
+ esac
+ done
+ ;;
NetBSD|OpenBSD) swapctl -A -t noblk >/dev/null;;
*) swapon -a >/dev/null;;
esac