xref: /freebsd/tests/sys/geom/class/eli/conf.sh (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1#!/bin/sh
2# $FreeBSD$
3
4class="eli"
5base=`basename $0`
6
7# We need to use linear probing in order to detect the first available md(4)
8# device instead of using mdconfig -a -t, because geli(8) attachs md(4) devices
9no=0
10while [ -c /dev/md$no ]; do
11	: $(( no += 1 ))
12done
13
14geli_test_cleanup()
15{
16	[ -c /dev/md${no}.eli ] && geli detach md${no}.eli
17	mdconfig -d -u $no
18}
19trap geli_test_cleanup ABRT EXIT INT TERM
20
21. `dirname $0`/../geom_subr.sh
22