检查软件包是否安装,如果未安装则执行安装

    1. __init_yum() {
    2. _is_install=$(yum list installed ipmitool | grep -Ec 'lipmitoolsof')
    3. if ((_is_install != 1)); then
    4. yum -y install ipmitool
    5. fi
    6. }