ngie c3922db0b9 - Add a geom_stripe specific cleanup function and trap on that function at
exit so things are cleaned up properly
- Use attach_md for attaching md(4) devices
- Don't hardcode /tmp for temporary files, which violates the kyua sandbox

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2016-01-08 21:28:09 +00:00

16 lines
266 B
Bash

#!/bin/sh
# $FreeBSD$
name="$(mktemp -u stripe.XXXXXX)"
class="stripe"
base=`basename $0`
gstripe_test_cleanup()
{
[ -c /dev/$class/$name ] && gstripe destroy $name
geom_test_cleanup
}
trap gstripe_test_cleanup ABRT EXIT INT TERM
. `dirname $0`/../geom_subr.sh