#!/bin/sh

HDR_FILE=$1

. /etc/bios_update/bios_update.conf

if [ "$AUTO_UPDATE_RPM" == "yes" ]; then

    # check dell_rbu driver
    if ! rbu_check; then
        exit 1
    fi

    if dellBiosUpdate -t -f $HDR_FILE; then
        echo "System ID match. Auto-update enabled. Staging BIOS updated."
        dellBiosUpdate -u -f $HDR_FILE
    fi

fi

