]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tests/sys/geom/class/mirror/conf.sh
Import tzdata 2018c
[FreeBSD/FreeBSD.git] / tests / sys / geom / class / mirror / conf.sh
1 #!/bin/sh
2 # $FreeBSD$
3
4 name="$(mktemp -u mirror.XXXXXX)"
5 class="mirror"
6 base=`basename $0`
7
8 gmirror_test_cleanup()
9 {
10         [ -c /dev/$class/$name ] && gmirror destroy $name
11         geom_test_cleanup
12 }
13 trap gmirror_test_cleanup ABRT EXIT INT TERM
14
15 syncwait()
16 {
17         while $(gmirror status -s $name | grep -q SYNCHRONIZING); do
18                 sleep 0.1;
19         done
20 }
21
22 . `dirname $0`/../geom_subr.sh