]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nbd/nbdroot: use udevsettle to wait for /dev/nbd0
authorHarald Hoyer <harald@redhat.com>
Thu, 1 Oct 2009 11:48:41 +0000 (13:48 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 1 Oct 2009 12:46:15 +0000 (14:46 +0200)
nbdroot is now in the initqueue, so we can use udevsettle

modules.d/95nbd/nbdroot

index 912eae243853c6ffefeb871cc79c51cf1d34f853..515b08b2512f592c16acd53ced1cc62d2d2d25c5 100755 (executable)
@@ -86,7 +86,11 @@ fsopts=${fsopts+$fsopts,}${nbdrw}
 i=0
 while [ ! -b /dev/nbd0 ]; do
     [ $i -ge 20 ] && exit 1
-    sleep 0.1
+    if [ $UDEVVERSION -ge 143 ]; then
+        udevadm settle --exit-if-exists=/dev/nbd0
+    else
+        sleep 0.1
+    fi
     i=$(( $i + 1))
 done