From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 27 Mar 2001 05:19:50 +0000 Subject: Re: Executing user script 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 On Mon, Mar 26, 2001 at 05:56:55PM -0500, Michael Wright wrote: > > I have a script that I want to call everytime that hotplug gets > activated. (i.e. I want to notify my application everytime a USB device > is added or removed) Is there a way to do this without hard coding > my script name in one of the hotplug scripts? A different way might be to look at usbdevfs. For usbview, I stat /proc/bus/usb/devices and if that changes, then I know a device was added or removed. Then you can go and scan the tree to see what happened. devfs can also notify your program when a device is seen or removed. As for your original question, I don't think there is a way to add a user helper, but not quite sure. Need to look at the scripts some more... Hope this helps, greg k-h -- greg@(kroah|wirex).com _______________________________________________ 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