From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Date: Wed, 02 Jun 2004 17:57:31 +0000 Subject: Re: Hotplug events vs proc - timing Message-Id: <20040602175731.GB28643@dhcp169.conectiva> List-Id: References: <40BCD9C6.1040909@cornell.edu> In-Reply-To: <40BCD9C6.1040909@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed Jun 02, 2004 at 13:36:09 -0400, Bill Nottingham wrote: > Greg KH (greg@kroah.com) said: > > On Tue, Jun 01, 2004 at 01:32:22PM -0600, Ivan Gyurdiev wrote: > > > Fedora's updfstab tool (part of kudzu) is trigged by hotplug to > > > add/remove things from fstab, such as my Fujifilm Digital Camera > > > (usb-storage, scsi emulation). However... it reads /proc/scsi/scsi, and > > > doesn't work as it should because it's triggered before /proc/scsi/scsi > > > is updated most of the time. Where is the bug, and how should this race > > > be corrected? > > > > The race should be fixed by having the hotplug script wait around for > > the proc file to show up. > > Hm, as I was thinking, the hotplug event is triggered by the USB > insertion; what's really needed for updfstab is that it gets > run triggered on the *scsi* device creation. Or is this the proc > file you're referring too? ---end quoted text--- What about having something like: while [ ! -f /proc/cmdline ]; do sleep 1; done at /etc/hotplug/usb.agent? But be careful, if your proc doesn't show it, this process would stay alive forever. Putting a timeout no X retries on it doesn't seem to be a bad idea. Also, note that /proc can be mounted, but not /proc/bus/usb. Or ignore the signal and coldplug it. :) Best regards, -- Marcelo Ricardo Leitner ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ 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