#!/bin/bash

_install() {
    if [[ $VMFLAG = 1 ]];then
        return 0
    fi

    if [[ $(grep swap /etc/fstab |grep -c '#') -eq 0 ]];then
        swapoff -a
        sed -i 's/^.*swap/#&/' /etc/fstab
    fi    
}

_check() {
    _check="PASS"

    if [[ $VMFLAG = 1 ]];then
        return 0
    fi
    
    grep -v '^#' /etc/fstab |grep -q swap
    if [[ $? -eq 0 ]];then
        _check="FAIL"
        PRINT_ERR "[ERROR] Swap Not Off."
    fi            
}
