From cf476dbc419a23aa01c6d27d9720caa93b2fd156 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 1 Oct 2009 13:48:41 +0200 Subject: [PATCH] nbd/nbdroot: use udevsettle to wait for /dev/nbd0 nbdroot is now in the initqueue, so we can use udevsettle --- modules.d/95nbd/nbdroot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules.d/95nbd/nbdroot b/modules.d/95nbd/nbdroot index 912eae2..515b08b 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 -- 2.7.4