summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class/tests/eli/conf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/geom/class/tests/eli/conf.sh')
-rwxr-xr-xsbin/geom/class/tests/eli/conf.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/sbin/geom/class/tests/eli/conf.sh b/sbin/geom/class/tests/eli/conf.sh
new file mode 100755
index 0000000..080fa61
--- /dev/null
+++ b/sbin/geom/class/tests/eli/conf.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# $FreeBSD$
+
+class="eli"
+base=`basename $0`
+
+no=0
+while [ -c /dev/md$no ]; do
+ : $(( no += 1 ))
+done
+
+geli_test_cleanup()
+{
+ [ -c /dev/md${no}.eli ] && geli detach md${no}.eli
+ mdconfig -d -u $no
+}
+trap geli_test_cleanup ABRT EXIT INT TERM
+
+. `dirname $0`/../geom_subr.sh
OpenPOWER on IntegriCloud