#! /bin/sh
set -e

. /usr/share/debconf/confmodule

file=/usr/bin/grub-installer

[ -f "$file" ] || exit 0

# Make grub the default bootloader
if db_get grub-installer/grub2_instead_of_grub_legacy; then
	db_fget grub-installer/grub2_instead_of_grub_legacy seen
	if [ "$RET" != true ]; then
		db_set grub-installer/grub2_instead_of_grub_legacy false
	fi
fi

# Don't install os-prober; the lenny version is not safe
sed -i "/[^#]apt-install os-prober/ s/apt/#apt/" $file
