Shutdown HW update

I need to get in after shutdown has written everything to disk but before
the reboot. As far as I can tell the only was is to write a driver (wait for
shoutdown message).

Has anyone had this problem? What did you do? Advice? Help!

Thanks,
-Peter Cleary