linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is there a way to just start a program...
@ 2002-10-26  7:52 Soeren Sonnenburg
  0 siblings, 0 replies; 2+ messages in thread
From: Soeren Sonnenburg @ 2002-10-26  7:52 UTC (permalink / raw)
  To: linux-hotplug

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.

Thanks,
Soeren.

PS: Infact I want my camera, whenever connected to save all the pictures
in a directory of the current date.




-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is there a way to just start a program...
@ 2002-11-21 20:54 David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2002-11-21 20:54 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-21 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-26  7:52 Is there a way to just start a program Soeren Sonnenburg
  -- strict thread matches above, loose matches on Subject: below --
2002-11-21 20:54 David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).