#!/bin/sh
# postinst script for grml-rescueboot

set -e

case "$1" in
    configure)
      if ls /boot/grml/*iso >/dev/null 2>&1 ; then
	echo "ISOs found inside /boot/grml, invoking update-grub:"
        update-grub
      else
	echo "No *.iso files found inside /boot/grml/. Please create /boot/grml and"
	echo "place Grml ISO(s) there. Finally invoke update-grub and enjoy your rescue system."
      fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0
