Wait up to timeout seconds for udev device

Occasional failures were observed in zconfig.sh because udev
could be delayed for a few seconds.  To handle this the wait_udev
function has been added to wait for timeout seconds for an
expected device before returning an error.  By default callers
currently use a 30 seconds timeout which should be much longer
than udev ever needs but not so long to worry the test suite
is hung.
This commit is contained in:
Brian Behlendorf
2010-09-10 21:44:17 -07:00
parent ac063c48ae
commit 2c4834f87a
3 changed files with 29 additions and 6 deletions
+1
View File
@@ -69,6 +69,7 @@ if [ ${UNLOAD} ]; then
else
check_modules || die "${ERROR}"
load_modules "$@"
wait_udev /dev/zfs 30
fi
exit 0