#!/bin/bash

_install() {
    # update rpms
    if [[ $VMFLAG = 0 ]];then
        local no_need_update_rpms="kernel kernel-headers kernel-devel mlnx-ofa_kernel-modules protobuf openvswitch umonitor3-agent"
    else
        local no_need_update_rpms="protobuf openvswitch umonitor3-agent"
    fi
    if [[ $OS == 'CentOS7' && $ARCH == 'x86_64' ]];then
        local DISABLEREPO="--disablerepo=mlnx"
    fi
    if ! yum update -y -q "$DISABLEREPO" --exclude="$no_need_update_rpms" &> /dev/null ;then
        PRINT_ERR "[ERROR] yum update Failed."
        return 1
    fi
}

_check() {
	_check="PASS"

}
