From e7b183b7f22ff700fcb779438e57bed5f3cbf8c8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 Jan 2009 13:25:16 -0800 Subject: [PATCH] Minor script updates almost ready to test --- scripts/zpios.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/zpios.sh b/scripts/zpios.sh index 844ab55153..57c90ba750 100755 --- a/scripts/zpios.sh +++ b/scripts/zpios.sh @@ -108,8 +108,9 @@ check_test() { } PROFILE= -ZPOOL_CONFIG="zpool-config.cfg" -ZPIOS_TEST="zpios-test.cfg" +ZPOOL_CONFIG=zpool-config.cfg +ZPIOS_TEST=zpios-test.cfg +ZPOOL_NAME=zpios while getopts 'hvpc:t:' OPTION; do case $OPTION in @@ -119,6 +120,7 @@ while getopts 'hvpc:t:' OPTION; do ;; v) VERBOSE=1 + VERBOSE_FLAG="-v" ;; p) PROFILE=1 @@ -151,6 +153,11 @@ if check_modules; then fi fi +msg "Waiting for /dev/zpios to come up..." +while [ ! -c /dev/zpios ]; do + sleep 1 +done + if [ ${VERBOSE} ]; then print_header print_spl_info @@ -158,15 +165,7 @@ if [ ${VERBOSE} ]; then fi # Create the zpool configuration -./zpool-create.sh -c ${ZPOOL_CONFIG} || exit 1 - -msg "${CMDDIR}/zpool/zpool status zpios" -${CMDDIR}/zpool/zpool status zpios || exit 1 - -msg "Waiting for /dev/zpios to come up..." -while [ ! -c /dev/zpios ]; do - sleep 1 -done +./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} || exit 1 if [ -n "${ZPIOS_PRE}" ]; then msg "Executing ${ZPIOS_PRE}"