linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J.C. Wren" <jcwren@jcwren.com>
To: linux-hotplug@vger.kernel.org
Subject: udev synchronization problems
Date: Thu, 15 Sep 2005 01:50:04 +0000	[thread overview]
Message-ID: <4328D34C.7070008@jcwren.com> (raw)

    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

             reply	other threads:[~2005-09-15  1:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15  1:50 J.C. Wren [this message]
2005-09-15 15:34 ` udev synchronization problems Kay Sievers
2005-09-19 16:51 ` J.C. Wren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4328D34C.7070008@jcwren.com \
    --to=jcwren@jcwren.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).