From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J.C. Wren" Date: Thu, 15 Sep 2005 01:50:04 +0000 Subject: udev synchronization problems Message-Id: <4328D34C.7070008@jcwren.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Forgive me if this has been addressed before. I did some googling for answers, but either there are none, or more likely, I am not using the correct search terms for useful results. I have a script to create compact flash cards for an application. It worked well until I switched from devfs to udev. The script is pretty basic. sfdisk, mke2fs, tune2fs, mount, cp, umount. I run into errors where sfdisk completes, then mke2fs complains that /dev/hde1 (hde is the PCMCIA CF card) doesn't exist. Or sometimes it gets past that, and tune2fs complains /dev/hde1 doesn't exist. As near as I can tell, it's because udevd doesn't react fast enough (from my scripts perspective) and present /dev/hde1 once it's been created. So I tried a few things. I put a loop in the script waiting for /dev/hde1 to become present. Didn't fix it. Added some 'sleep 1' commands. Didn't fix it. Tried a while loop that waited for /dev/hde1 to become present in /proc/partitions. Didn't fix it. However, running these commands by hand almost always succeed. Is there some reliable way to determine that /dev/hde1 is *really* there, and ready for action? I've tried 2.6.12-gentoo-r10, 2.6.13 (vanilla), both against udev 068 and 069. I've been through the udev utilities, didn't see anything that looked like it was what I neeed. Is there a handy command that makes sure things are flushed and updated before the next action can take place? I'll cheerfully take a solution, or go back to Google if someone can tell me what sort of search terms would be relevant. Thanks, --jc ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ 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