flarefox Posted June 20, 2005 Report Share Posted June 20, 2005 I'm still fairly new to much of this, but I am making a digital media box and I want to allow people to put a removable device such as a flash card or digital camera or hard drive on the system and have it copy over images/video files when they insert them. I can make the script no problem, but...how do I get it to run when a removable device is inserted? Is there a simple way to do this? ~Dee Quote Link to comment Share on other sites More sharing options...
jboy Posted June 21, 2005 Report Share Posted June 21, 2005 (edited) This can probably be done through the built-in hotplugging capabilities of the Linux kernel. Here is a link to check out: http://linux-hotplug.sourceforge.net Here is a writeup on something that sounds similar to what you want to do: http://jphoto.sourceforge.net/?selected=sync Also, look around in /etc/hotplug Check the hotplug manual page (man hotplug) You might try google for keywords like linux, hotplug, usb, script, etc. To see hotplugging in action, plug in a USB pen drive and then execute the command dmesg from a terminal. You'll see the device messages that get generated from the hotplug event. It looks like much of this is done through the various hotplug scripts, so you have to somehow find out how to get your scripts working within that structure. Edited June 21, 2005 by jboy Quote Link to comment Share on other sites More sharing options...
flarefox Posted June 21, 2005 Author Report Share Posted June 21, 2005 Looks like that's what I need to look for! Thanks! ~Dee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.