#!/bin/sh

echo "$0 starting" | logger -s

# explicitly stop LunaSysMgr, and wait for it to complete, so that there
# is no conflict when PmUpdater draws to display below
echo "$0 stopping LunaSysMgr" | logger -s
stop LunaSysMgr
echo "$0 done stopping LunaSysMgr" | logger -s

# wait a sec to be sure frame buffer is no longer being swapped, which
# would cause PmUpdater's drawing to be offscreen
sleep 1

# launch PmUpdater to draw the shutdown animation
/usr/bin/PmUpdater -shutdown &

echo "$0 done" | logger -s
