site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 15 Apr 2007, at 19:32, Steve Hayman wrote: On 14-Apr-07, at 4:24 PM, jmzorko@mac.com wrote: Cheers, Graham. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... How do I detect the presence / insertion of a DVD, much like the autorun mechanism on Linux? I want to automatically run certain operations when the system detects that a DVD with certain files has been inserted. Since this is a quick weekend project for a friend, i'd like to be able to do it in Perl or bash if possible (the "certain operations" I speak of are basically decompress the files and copy them to a certain place). The DVD will likely be created on a Linux or Windows box. You might try using "wait4path /Volumes/MyDVD", which simply waits for a specified path to show up; if the path isn't found, it sleeps until the mount table is updated and then checks again. wait4path exits when the path is finally there. Interesting behaviour wait4path has though...it has a while(){} instead of a do{}while(), so if the path already exists, it doesn't return until an appropriate event occurs. Try "wait4path /" for instance. I sent a patch in to bugreporter a good while ago, so maybe 10.5 works differently... This email sent to site_archiver@lists.apple.com