1#!/bin/sh
| 1#!/bin/sh
|
2# $FreeBSD: head/tools/regression/geom_eli/init-i-P.t 182452 2008-08-29 18:10:18Z pjd $
| 2# $FreeBSD: head/tools/regression/geom_eli/init-i-P.t 293436 2016-01-08 19:38:59Z ngie $
|
3
| 3
|
| 4. $(dirname $0)/conf.sh 5
|
4base=`basename $0`
| 6base=`basename $0`
|
5no=45
| |
6sectors=100
| 7sectors=100
|
7keyfile=`mktemp /tmp/$base.XXXXXX` || exit 1
| 8keyfile=`mktemp $base.XXXXXX` || exit 1
|
8mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 9 10echo "1..1" 11 12dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 13 14geli init -B none -i 64 -P -K ${keyfile} md${no} 2>/dev/null 15if [ $? -ne 0 ]; then 16 echo "ok 1" 17else 18 echo "not ok 1" 19fi 20
| 9mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 10 11echo "1..1" 12 13dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 14 15geli init -B none -i 64 -P -K ${keyfile} md${no} 2>/dev/null 16if [ $? -ne 0 ]; then 17 echo "ok 1" 18else 19 echo "not ok 1" 20fi 21
|
21mdconfig -d -u $no
| |
22rm -f $keyfile
| 22rm -f $keyfile
|