LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Can halevt update status after a blank disc is written? (https://www.linuxquestions.org/questions/linux-desktop-74/can-halevt-update-status-after-a-blank-disc-is-written-762227/)

nemesis9 10-15-2009 05:49 PM

Can halevt update status after a blank disc is written?
 
We are building a custom linux system and we are using halevt to report disc insertions/mounts/removals, etc. I am using halevt to call a program that we wrote.
When I put in a blank DVD, it is reported as a blank DVD. Then, we burn some data to the DVD. Afterwards I want halevt to update the status to DVD Data without needing to eject and reinsert the DVD. Is there some way I can have it fire an event (and call our custom program) after the disc is written to (without ejecting and reinserting)?

Thanks

David the H. 10-16-2009 08:25 AM

I'm no expert, but as I understand it, halevt simply monitors the system changes that hal reports and executes commands if it encounters something that matches a rule in it's config file.

I'd be surprised if hal didn't report some change in status when a disc becomes readable, but whether you can do what you want without ejecting the disc, I don't know. It could be that the system itself can't detect the change unless the disc is reloaded. Most burning programs seem to automatically eject discs at the end of a burn, and there's probably a reason for that. I can also imagine that other functions like udev device creation may depend on a physical reload too.

So all you have to do is determine whether and when hal reports the change in status, and write a corresponding halevt rule for it. You could probably start by watching lshal in monitor mode (lshal -m).


All times are GMT -5. The time now is 06:51 AM.