Binary package “eject” in ubuntu precise
ejects CDs and operates CD-Changers under Linux
This little program will eject CD-ROMs (assuming your drive supports
the CDROMEJECT ioctl). It also allows setting the autoeject feature.
On supported ATAPI/IDE multi-disc CD-ROM changers, it allows changing
the active disc.
You can also use eject to properly disconnect external mass-storage
devices like digital cameras or portable music players.