You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
addon-context-linux/base/etc/one-context.d/04-mount-swap

16 lines
251 B

#!/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