#!/bin/sh

. /lib/partman/definitions.sh
. /lib/partman/crypto_tools.sh

dev=$2
id=$3
part=$dev/$id

cd $dev

type=""
if [ -f $part/crypto_type ]; then
	type=$(cat $part/crypto_type)
fi

if [ -f $part/skip_erase ]; then
	exit 0
fi

open_dialog PARTITION_INFO $id
read_line num id size type fs path name
close_dialog

dev_wipe $path $size $type || true

