From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gioele Barabucci Date: Tue, 27 Mar 2001 18:58:01 +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 Tuesday 27 March 2001 00:56, 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? > It does not seem difficult... 1st we can create a /etc/hotplug/usb.ext_scripts (containing the names of programs we have to call) an then execute it line by line from usb.agent. We can also use something like this $SCRIPT plugged $SCRIPT nodriver $SCRIPT unplugged $SCRIPT ok so $1 in your script is the exit status of the various operation done by hotplug script. Btw I think the devfs approach is better... -- Gioele Barabucci (Gb]) ) mailto:dev@gioelebarabucci.com ) http://www.gioelebarabucci.com ) ) I've been and now I've gone ) ) /Magic Pie^Oasis _______________________________________________ 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