{%
    if State == 'New' then
        echo('Please make sure the iBMC is working while upgrading.\r\nUpdating...')
    end

    if State == 'Exception' or State == 'Killed' or State == 'Cancelled' then
        if Message.Message then
            echo(string.format("%s\n", Message.Message))
        end
        echo('Upgrade failed.')
    end

    if State == 'Completed' then
        if BmcActiveMode == 'ResetBMC' then
            echo('Upgrade successfully and need to reboot the BMC to active the upgrade.')
        else
            echo('Upgrade successfully.')
        end
    end
    if GetRealUpgradePath[1] ~= true then
        echo('No such file or directory.')
    end
%}