Fix a typo and use blkid flags

Instead of using grep and cut use only the blkid flags to output
SWAP_DRIVES.
pull/18/head
Dan Kelleher 9 years ago
parent 5180beec73
commit cb570384b9

@ -2,7 +2,7 @@
activate_swaps() {
SWAP_DRIVES=$(blkid | grep 'TYPE=\"swap\"' | cut -d':' -f1)
SWAP_DRIVES=$(blkid -t TYPE="swap" -o device)
for SWAP in $SWAP_DRIVES ; do
if [ -z "$(swapon -s | grep $SWAP)" ]; then
swapon $SWAP

Loading…
Cancel
Save