#!/bin/sh
. /usr/share/debconf/confmodule

db_get systemd-boot-installer/skip
if [ "$RET" = true ]; then
	exit 1
fi

ARCH="$(archdetect)"

case $ARCH in
    amd64/efi|arm64/efi|loong64/efi|riscv64/efi)
	;;
    *)
	logger -t systemd-boot-installer "systemd-boot is only usable on 64bit EFI systems, not $ARCH"
	exit 1
	;;
esac

exit 0
