Merge pull request #18 from fasrc/Swap
Swap script will now swap on all available swap spacespull/20/head
commit
a99ce6b1ed
@ -1 +1,15 @@
|
||||
swapon -L swap
|
||||
#!/bin/bash
|
||||
|
||||
activate_swaps() {
|
||||
|
||||
SWAP_DRIVES=$(blkid -t TYPE="swap" -o device)
|
||||
for SWAP in $SWAP_DRIVES ; do
|
||||
if [ -z "$(swapon -s | grep $SWAP)" ]; then
|
||||
swapon $SWAP
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
activate_swaps
|
||||
|
||||
|
Loading…
Reference in new issue