Re: how to detect inserted DVD media from bash or Perl?
Re: how to detect inserted DVD media from bash or Perl?
- Subject: Re: how to detect inserted DVD media from bash or Perl?
- From: Steve Hayman <email@hidden>
- Date: Sun, 15 Apr 2007 14:32:11 -0400
On 14-Apr-07, at 4:24 PM, email@hidden wrote:
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.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden