4 . $(dirname $0)/conf.sh
8 keyfile=`mktemp $base.XXXXXX` || exit 1
9 mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1
13 dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1
15 geli init -B none -P -K $keyfile md${no}
16 geli attach -p -k $keyfile md${no}
17 if [ -c /dev/md${no}.eli ]; then
22 # Be sure it doesn't detach before 'detach -l'.
23 dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null
25 if [ -c /dev/md${no}.eli ]; then
30 geli detach -l md${no}
31 if [ -c /dev/md${no}.eli ]; then
36 dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null
38 if [ ! -c /dev/md${no}.eli ]; then