From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sun, 16 Oct 2005 11:57:20 +0000 Subject: Re: udev and usb.agent Message-Id: <20051016115720.GA15594@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 Sun, Oct 16, 2005 at 09:33:39AM +1000, Greg Bell wrote: > >>What am I doing wrong? Is there a way to get hotplug to call udev to do > >>the device mapping BEFORE usb.agent gets called? > > > >The "camera script" is probably triggered by the usb device event, not the > >block device event. Use an explicit udev rule that matches the block device > >and the usb properties of the camera. > > But the udev, whether the rule is for USB or SCSI, is getting run after > the usb.agent stuff... Probably, but usb.agent has nothing to do with the block device event! These are completely different events... > >The old agent crap should no longer > >be used. > > But udev only does device creation, not scripts. Catch up! udev does _all_ hotplug today. Everything that runs on hotplug events is managed by udev. You can plug into any stage of the event processing with udev rules and run an unlimited number of scripts... > >Modern desktop setups don't > >need to fiddle around with device id's and scripts to make your camera > >just work. > > Sure, they 'just work', but they don't do the fun stuff I'm hoping to > script up... > > So, again, why does hotplug call udev *after* it calls usb.agent? Again, udev calls _everything_, also the agent stuff. Use the right event, and everything will work! > usb.agent can't do much since it doesn't have a nice static name for the > newly inserted usb device until after udev runs... Matching on the right event will carry DEVNAME in the environment, which is the name of the node. Good luck, Kay ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ 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