From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Tue, 10 Jul 2007 15:39:24 +0000 Subject: Re: udev/ubuntu problem solved Message-Id: <3ae72650707100839j56d89aaeib4be100a094b6b4b@mail.gmail.com> List-Id: References: <200707101653.31621.aj@dungeon.inka.de> In-Reply-To: <200707101653.31621.aj@dungeon.inka.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 7/10/07, Andreas Jellinghaus wrote: > I finally figured out what is wrong with udev on ubuntu. > > ubuntu mounts usbfs as /proc/bus/usb/.usbfs > and has udev create /dev/bus/usb and bind-mounts that as /proc/bus/usb. What are theses guys smoking? That's so sick to bind-mount /dev-directories to /proc! I wouldn't support such a system at all. It is totally broken. > so even though I get events for /proc/bus/usb/NNN/NNN devices and they > exist if I manually look, my app doesn't find them. the reason is: udev runs > /lib/udev/openct_usb, but creates the device in /dev/bus/usb (and thus on > ubuntu /proc/bus/usb) only after my script finishes. while I can add sleeps > to avoid races, they don't help because udev will not create the device until > my script gives up. Are you using PROGRAM? That is for plugging external program into udev to give devices a name or symlink. If you use RUN+=, your program never runs before the node and all symlinks are created. > also during debugging I noticed: it is not a good idea to start/stop udev > using the init script. at first I thought udev wasn't re-reading it rules > properly, so I tried that. Nobody should ever stop udev, You may miss important system events here. > the result of restarting udev init script is > this: /proc/bus/usb is no longer a bind mount of /dev/bus/usb Well, systems that do such crap, just ask for trouble like this. Kay ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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