From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sun, 05 Aug 2001 00:22:45 +0000 Subject: Re: Is this the official hotplug ? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > Thanks for your answer. Do you know where I can find information > on what happens when I plug a device to the usb port. Some is at http://linux-hotplug.sourceforge.net/?selected=usb but that's just focussing on the hotplug-related stuff, not describing usbdevfs or how the kernel manages enumeration. > I can see that /proc/bus/usb/devices gets information on my device. Good, the kernel didn't have problems enumerating it. > Now I > would like to start a program, or script when this happens (ONLY > when a certain device is inserted), how shall I do that, One example: http://jphoto.sourceforge.net/?selected=sync That runs a script to download images from one type of camera, when it's hooked up. Similar setups have been used to download device firmware, start PDA hotsync daemons, and so on. (I suppose the hotplug site should get an example too...) If you need to load a kernel driver _and_ run a script, then the name of the module and script should be the same; you won't even need to modify usb.handmap if your driver is written correctly (using MODULE_DEVICE_TABLE so that "depmod" does its magic). - Dave _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel