From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Tue, 27 Mar 2001 15:58:57 +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 > 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? Sounds exactly like when /etc/hotplug/usb.agent gets called, so at some level you just want a enhanced hotplug agent behavior. At this point there's no general hook to make that particular behavioral change, so you'd have to modify or replace that agent script. Do you think this will be a common enough task that the scripts should accomodate it directly? You didn't say what your "application" does. As Greg noted, if you have usbdevfs configured there are other ways to get such notifications. As just one example, the Java USB library has a standard notifier interface that calls out to report add/remove of devices and busses. I don't think the C "libusb" does such stuff now though. - 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