logical_thought
June 13th, 2008, 03:50 PM
I'm trying to get a script to run whenever a cd is inserted, but I don't know how. I figured out how to get it to work with gnome, but I need to find a way to get this to work on a headless server when no one is logged in.
So far I've tried setting up my script in cron. I install autofs and told my script to try and access the cdrom every few minutes, which works on the first cd...but then it keeps accessing the same disk.
I would like to find a way to have the script run one time (instead of with cron) when the cd is inserted and then it ejects.
PS. Sorry if I posted this in the wrong place, I wasn't sure where this fit.
So far I've tried setting up my script in cron. I install autofs and told my script to try and access the cdrom every few minutes, which works on the first cd...but then it keeps accessing the same disk.
I would like to find a way to have the script run one time (instead of with cron) when the cd is inserted and then it ejects.
PS. Sorry if I posted this in the wrong place, I wasn't sure where this fit.