2005-12-07 01:27:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2016-01-01 03:12:51 +00:00
|
|
|
name="$(mktemp -u mirror.XXXXXX)"
|
2005-12-07 01:27:23 +00:00
|
|
|
class="mirror"
|
|
|
|
base=`basename $0`
|
|
|
|
|
2016-01-03 06:02:56 +00:00
|
|
|
gmirror_test_cleanup()
|
|
|
|
{
|
|
|
|
[ -c /dev/$class/$name ] && gmirror destroy $name
|
|
|
|
geom_test_cleanup
|
|
|
|
}
|
|
|
|
trap gmirror_test_cleanup ABRT EXIT INT TERM
|
|
|
|
|
2017-12-14 22:15:46 +00:00
|
|
|
syncwait()
|
|
|
|
{
|
|
|
|
while $(gmirror status -s $name | grep -q SYNCHRONIZING); do
|
|
|
|
sleep 0.1;
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2005-12-07 01:27:23 +00:00
|
|
|
. `dirname $0`/../geom_subr.sh
|