From: Harald Hoyer Date: Thu, 1 Oct 2009 11:48:41 +0000 (+0200) Subject: nbd/nbdroot: use udevsettle to wait for /dev/nbd0 X-Git-Tag: 003~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf476dbc419a23aa01c6d27d9720caa93b2fd156;p=thirdparty%2Fdracut.git nbd/nbdroot: use udevsettle to wait for /dev/nbd0 nbdroot is now in the initqueue, so we can use udevsettle --- diff --git a/modules.d/95nbd/nbdroot b/modules.d/95nbd/nbdroot index 912eae243..515b08b25 100755 --- a/modules.d/95nbd/nbdroot +++ b/modules.d/95nbd/nbdroot @@ -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