Run script on thumb drive insertion?
Neil Cherry
ncherry at linuxha.com
Fri Jun 8 21:58:40 UTC 2007
Derek Broughton wrote:
> Neil Cherry wrote:
>
>> I'd like to run a script automatically when a thumb drive is
>> inserted. Is there such a program? If not I think I can stat
>> the mount point and on change run a script. I have the basic
>> C structure from a biff program I wrote a long time ago.
>>
> It's a while since I've done this but I'd look at "udev" and its "rules.d"
> directory. Create a rule that recognizes the device, and use the PROGRAM=
> parameter to tell it to run a program.
Thanks! I'll check that out!
--
Linux Home Automation Neil Cherry ncherry at linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
Author of: Linux Smart Homes For Dummies
More information about the ubuntu-users
mailing list