Rewrite 04-mount-swap to swap on all swap partitions.

The 04-mount-swap was only mounting on swap with a label swap.
This will now swap on all swap type partitions.
pull/18/head
Dan Kelleher 9 years ago
parent 8669f28e45
commit 5180beec73

@ -1 +1,15 @@
swapon -L swap
#!/bin/bash
activate_swaps() {
SWAP_DRIVES=$(blkid | grep 'TYPE=\"swap\"' | cut -d':' -f1)
for SWAP in $SWAP_DRIVES ; do
if [ -z "$(swapon -s | grep $SWAP)"]; then
swapon $SWAP
fi
done
}
activate_swaps

Loading…
Cancel
Save