Operating System - HP-UX
1755170 Members
3308 Online
108830 Solutions
New Discussion юеВ

Re: Eject after DVD umount?

 
SOLVED
Go to solution
Jim Turner
HPE Pro

Eject after DVD umount?

I've noticed when burning a DVD-RW under 11.23 (IA64 rx2600) that growisofs ejects the DVD tray at the end. Does anyone know how it does that? I have scripts that I use to mount and umount DVDs for reading, and it would be really cool to add an "eject" at the end of my umount script. Thanks.
3 REPLIES 3
Tom Danzig
Honored Contributor
Solution

Re: Eject after DVD umount?

I found this C code a while back. I compiled it on a HP-UX 11.0 box and it worked fine. Had to be run as root though.
Jim Turner
HPE Pro

Re: Eject after DVD umount?

Tom, that worked perfectly! It compiled with the default K&R compiler with no fuss, and the executable works with both the raw scsi device file and a symlink to the raw disk device.

# file eject
eject: ELF-32 executable object file - IA64

# lssf /dev/rscsi/c0t0l0
sctl card instance 0 SCSI target 0 SCSI LUN 0 at address ??? /dev/rscsi/c0t0l0

# ll /dev/dvd
lrwxr-xr-x 1 root sys 16 Apr 12 2005 /dev/dvd -> /dev/rdsk/c0t0d0

# eject /dev/rscsi/c0t0l0
(Click! and the DVD-RW drawer springs out.)

# eject /dev/dvd
(Click! and the DVD-RW drawer springs out.)

I've attached the 11.23 IA64 executable in case anyone can use it. Thanks again!!!
Jim Turner
HPE Pro

Re: Eject after DVD umount?

See above. Thanks again.