#!/bin/bash

###############################################
#    Description: wait for reboot
#    Parameter:   param1:wait times
#    Return:      0-success, 1-failed
###############################################
function INIT_Wait_Reboot()
{
    local count=$1
    while [ "${count}" -gt 0 ]
    do
        echo -e " ${count} \c"
        ((count--))
        sleep 1
    done
    echo ""
}

echo "The System will be reboot after 5 seconds."
INIT_Wait_Reboot 5

reboot

sleep 60
