How can I update my runscripts to wait on reboot until is the CD ejected and then press a key to reboot...

I have livecd based on Gentoo...