# Store settings for the PBA runtime

if [[ "$OPAL_PBA_UNLOCK_MODE" == "permanent" ]]; then
    LogUserOutput "WARNING: TCG Opal 2 PBA will *permanently* unlock disks (OPAL_PBA_UNLOCK_MODE='$OPAL_PBA_UNLOCK_MODE')"
fi

cat > "$ROOTFS_DIR/.OPAL_PBA_SETTINGS.sh" << -EOF-
OPAL_PBA_UNLOCK_MODE='$OPAL_PBA_UNLOCK_MODE'
OPAL_PBA_DEBUG_PASSWORD='$OPAL_PBA_DEBUG_PASSWORD'
OPAL_PBA_DEBUG_DEVICE_COUNT='$OPAL_PBA_DEBUG_DEVICE_COUNT'
-EOF-
