4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
17 # Copyright (c) 2016 by Delphix. All rights reserved.
20 function initialize_prog_line # pool disk
24 zpool status "$pool" | grep "$disk" | grep "initialized"
27 function initialize_progress # pool disk
29 initialize_prog_line "$1" "$2" | \
30 sed 's/.*(\([0-9]\{1,\}\)% initialized.*/\1/g'
35 if poolexists $TESTPOOL; then
36 log_must zpool destroy -f $TESTPOOL
39 if poolexists $TESTPOOL1; then
40 log_must zpool destroy -f $TESTPOOL1