#!/bin/sh

log() {
	logger -t lilo-installer "$@"
}

ARCH="$(archdetect)"
case $ARCH in
	i386/mac|amd64/mac)
		# LILO stands a better chance of working in BIOS
		# compatibility mode, where /sys/firmware/efi doesn't exist.
		if [ -d /sys/firmware/efi ]; then
			log "LILO not usable on Intel-based Macs without BIOS compatibility; use elilo"
			exit 1
		fi
		;;
esac

exit 0
