On Fri, Aug 04, 2006 at 04:13:26PM -0700, Michael Coulter wrote:
> On Tue, Aug 01, 2006 at 02:28:25PM -0700, andrew fresh wrote:
> > I am in need the ability to run a script when a cd is inserted.  I am
> > not finding any way of getting notified when that happens, so I am
> > asking here.  If not, I can just loop cdio info and check for a disk.  
> > 
> > Is there something that will run a script when I insert a CD?
> 
> If you grab a copy of INF-8090.pdf, have a look at Appendix E.
> It would probably require a little bit of programming, but
> if you want to do this nicely, it appears to be the right way.

That doc says that:

        Current ATAPI implementations do not support queuing nor
        overlap, so the immediate mode must be used.

and that: 

        The Immediate mode allows the host to periodically poll the
        device to find events and examine status. 

So it sounds like no matter what you have to poll for the disk being
inserted.  It MAY be less work for the system if that feature were added
somewhere and then hotplug (or something) were notified, but for my
purpose, when not burning disks there is plenty of CPU so for now
        while [ true ]; do burn_disc; sleep 3; done
is a good enough solution.

l8rZ,
-- 
andrew - ICQ# 253198 - JID: [EMAIL PROTECTED]

BOFH excuse of the day: Someone was smoking in the computer room and
    set off the halon systems.

Reply via email to