From 9991894b2106b068ac8b4c066f7bbc277113b75b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jan 2009 21:34:09 -0800 Subject: [PATCH] Minor script fix --- scripts/zpios.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/zpios.sh b/scripts/zpios.sh index 5ba97b0a68..bfce363a81 100755 --- a/scripts/zpios.sh +++ b/scripts/zpios.sh @@ -158,6 +158,7 @@ if check_modules; then fi fi +# Wait for device creation while [ ! -c /dev/zpios ]; do sleep 1 done @@ -181,12 +182,18 @@ echo date zpios_start zpios_stop -print_stats + +if [ ${VERBOSE} ]; then + print_stats +fi # Destroy the zpool configuration ./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1 -# Unload the test module stack +# Unload the test module stack and wait for device removal unload_modules +while [ -c /dev/zpios ]; do + sleep 1 +done exit 0