Not entirely related, but I have a tiny little bash script set up
(and executed with irexec) to eject my cdrom drive:
eject -T /dev/hdb
exit 0
the -T switch (toggle?) appears to be only in 'eject' since 2.1
In my lircrc:
begin
prog = irexec
button = DVD
repeat = 0
config = /usr/local/bin/mythejectcd.sh
end