xref: /freebsd/tests/sys/geom/class/eli/conf.sh (revision d9f0ce31900a48d1a2bfc1c8c86f79d1e831451a)
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