#!/bin/sh

. /lib/partman/lib/base.sh

dev=$1
disk=$(cat $dev/device)

if ! /sbin/cryptsetup --help | grep -q hw-opal-factory-reset || ! blockdev-opal-supported $disk; then
	exit 0
fi

db_metaget partman-crypto/text/opal_factory_reset description
printf "opal_factory_reset\t${RET}\n"

