summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-10-01 13:48:41 +0200
committerHarald Hoyer <harald@redhat.com>2009-10-01 14:46:15 +0200
commitcf476dbc419a23aa01c6d27d9720caa93b2fd156 (patch)
tree27c72cf4aac102f00b6d3c6975bae3a556c92311
parent8bfed103d8156717854d4267a6aa34697d26ce03 (diff)
nbd/nbdroot: use udevsettle to wait for /dev/nbd0
nbdroot is now in the initqueue, so we can use udevsettle
-rwxr-xr-xmodules.d/95nbd/nbdroot6
1 files changed, 5 insertions, 1 deletions
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