From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Thu, 21 Nov 2002 20:54:13 +0000 Subject: Re: Is there a way to just start a program... Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Soeren Sonnenburg wrote: > Hi! > > I have an MMC/CF reader here... I set it up such that whenever the > usb-storage module gets loaded it copies all the stuff on the MMC/CF > card to certain directory and then unmounts the device. > > However this happens only once. When the driver is *NOT* already loaded. > So I wonder whether there is some of ACTION (like there is ADD/REMOVE > atm), with which I can just startup programs whenever a device is added. How did you set this up -- with a 'modules.conf' entry? There is a fundamental mismatch between 'modules.conf' and the problem of configuring devices ... 'modules.conf' talks modules, not devices, and modules routinely manage more than one device. People have had generally better luck with hotplug "driver setup scripts", that run after devices get hooked up. For example, if you had a script in /etc/hotplug/usb/usb-storage, it would run each time you hooked up a device that looks like usb-storage would drive it. For usb-storage in particular, you might look at two packages that have gotten some recent mail (I don't have the URLs handy): - devlabel - usbmount The deal is that with more than one storage device, or with storage devices you unplug and replug, it can be tricky to keep the devices straight. So those tools can help address some of the problems. - Dave > Thanks, > Soeren. > > PS: Infact I want my camera, whenever connected to save all the pictures > in a directory of the current date. Heh ... I did that with jPhoto ages ago. Whenever I connect a PTP camera, that's exactly what it does. Easier than with usb-storage. I don't know if gPhoto2 has the same kind of functionality. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel