Is there a way to just start a program...
Quoted 9 lines · Soeren Sonnenburg
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
Quoted 5 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel