From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Mon, 17 Oct 2005 01:44:15 +0000 Subject: Re: udev and usb.agent Message-Id: <20051017014415.GA25090@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, Oct 17, 2005 at 10:42:20AM +1000, Greg Bell wrote: > > >Catch up! udev does _all_ hotplug today. > > Oh, oops. OK I've done some more reading. However the FAQ at > http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ > > ...says/implies that udev is for creating the /dev nodes and not much else > because that's where devfs went wrong (trying to do too much). They even > refer the reader to HAL for the fancier more desktopy stuff. > > I see the PROGRAM= feature, but it seems that's run before the dev node > gets created, and is intended for using a script to figure out what the > node should be named, rather than reacting after the node's been created. PROGRAM is for naming the node and therefore runs before the node is created. RUN is for postprocessing. > Maybe I'm looking at a multiple line udev.rules entry. I'm used to the > main part of the event matching being a BUS= or KERNEL=. > > My understanding of what goes on is: > > 1) device is plugged in > 2) USB event occurs > 3) udev or usb.agent inserts SCSI module (sr_mod) > 4) SCSI event occurs > 5) udev creates /dev/camera (my rule) > 6) ??? reacts and runs script to automatically slurp pictures off, etc. > > Its step 6 I'm having trouble with. Yeah, 6 runs along with 3, that's your trouble. :) 2 and 4 are different events, 2 will have finished before 4 even starts. What you are looking for is 7, the block device event, which creates the node. 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