#!/bin/bash
logger -s "## postinst_footer ##"

## NOTE: LAST STEP: copy boot-control partitions and un-mount
 if [ "${isImage}" == "true" ] && [ -n "${upgradeDevice}" ]; then
    umount ${upgradePath}
    umount -a 2>/dev/null
fi
# sleep again to let the umount operation propogate kernel status
sleep 2
sync

echo "upgrading 100" > /tmp/fw_update_status
echo "postinst complete."
echo "rebooting for the upgrade to take effect..."
# sleep 10 seconds to allow UI to detect update
sleep 10
reboot -f -h -i &

exit 0
