Eject CD-ROM Drive after application Installation
===

I have an application in Linux that installs from a CD-ROM Device. 

When the CD-ROM is inserted into the Drive, the autorun feature runs the installation script in an xterm window. Now when the installation is over, I do an 'exit 1' , and the xterm window prompts the user to 'press any key to close the window'. My problem is that I would like the script to eject the CD-ROM Drive after the Installation is over.

However since the installation script is still running from the CD-ROM Drive, the script cannot unmount the CD-ROM Drive and eject the Drive. 

Could any please give me some idea of how the script could possibly eject the CD-Drive after Installation? 