Re: how to detect inserted DVD media from bash or Perl?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 14-Apr-07, at 4:24 PM, jmzorko@mac.com wrote: _______________________________________________ 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Steve Hayman