From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 22 Aug 2005 21:48:58 +0000 Subject: Re: Run hotplug scripts after device node is created? Message-Id: <20050822214858.GA18871@vrfy.org> 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, Aug 22, 2005 at 11:23:44PM +0200, Stefan Schweizer wrote: > On 8/22/05, Kay Sievers wrote: > > On Mon, Aug 22, 2005 at 10:45:49PM +0200, Stefan Schweizer wrote: > > > I use a hotplug script to download the firmware to my hp printer. This > > > is needed for HP Laserjet 1000,1005 and 1020. The procedure is just > > > cat firmware > /dev/usb/lp* > > > > > > The problem is that /dev/usb/lp* has to exist for the script to work. > > > In earlier udev versions I just added "sleep 20" to the script to be > > > sure that the device node exists. With the last version of udev this > > > seems to be no longer possiblee because udev waits for the hotplug > > > script to exit before creating the device node :( > > > > No, only PROGRAM and IMPORT runs before the node is created. > > > > > How can I make sure that the hotplug script is run after usblp is > > > loaded and after the device is created? > > > > RUN runs definitely after the node handling is finished. > > > I don't use either of those .. > > this is just a plain old hotplug script with > /etc/hotplug/usb/hplj.usermap: > hplj1005 0x0003 0x03f0 0x1317 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 > 0x00 0x00000000 > /etc/hotplug/usb/hplj1005 > waiting and catting the firmware into the device node. Somewhere in your rules is a: RUN+="/sbin/udev_run_hotplugd" right? If not, /etc/hotplug.d/ is not called. > > > Is there some hotplug-way to find out which device-node I am supposed > > > to load the firmware into? > > > > Don't understand the question. > currently the script is scanning all devices for a supported one .. is > there some variable in a hotplug script to read out the device node? Sure. DEVNAME. Kay ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ 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