Auto swallow and eject cd (from the commandline)
I am trying to close and eject cd from the commandline. The purpose is to rip a lot of audio cds with abcde.
I use `eject` and `eject -t` commands to open and close the cd drive.
I mount my cdrom with this line in /etc/fstab:
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
The problem is that ejecting the cd means also to unmount it. After the unmount, there is no way to close it.
When I start the computer, `eject -t` works and closes the tray. But if I open it again (with `eject`) `eject -t` does not find `/dev/cdrom` because it is not mounted (the tray is open and there is no cd mounted).
Someone sees a simple solution?
P-S : Debian (unstable) system.
In my past experience, `mount /dev/cdrom` will, if the tray is open, close the tray and attempt to mount a disc, if present.