How can I programatically eject a live cd?

Garrett Cooper youshi10 at u.washington.edu
Fri Oct 7 15:22:55 PDT 2005


Philip Hallstrom wrote:

> Hi all -
>
> I've built a live CDROM based off of the cdroot package and 4.x.  It's 
> designed to be popped into a machine, wipe the hard drive, install a 
> custom image, and that's it.
>
> Everything works great with one exception.
>
> I would *love* to be able to have the CDROM automatically eject when 
> it's finished (and/or shutdown).  This way a user could power on a 
> headless box, pop in the cd, reboot, let it's do it's thing and know 
> it was done when the CDROM ejected.
>
> I know the drives can do it because I've seen some other CD's (most 
> recent a seagate disk utility) do it.
>
> But the closest I can come is:
>
> cdcontrol -f acd0 eject
>
> and then I can press the eject button and it will eject.
>
> This is fine for me, but I don't want the people doing this to have to 
> know to wait for the disk lights to stop.
>
> Any suggestions?
>
> Thanks!
>
> -philip

    It'd be better to shut down probably because many machines 
automatically retract the CD tray after rebooting.
-Garrett


More information about the freebsd-questions mailing list