2 # postinst script for grml-rescueboot
6 update_grub_wrapper() {
7 # default, unless configured otherwise:
8 ISO_LOCATION=/boot/grml
10 if [ -r /etc/default/grml-rescueboot ] ; then
11 . /etc/default/grml-rescueboot
14 if ! ls "${ISO_LOCATION}"/*iso >/dev/null 2>&1 ; then
15 echo "INFO: No *.iso files found inside ${ISO_LOCATION}."
16 echo "INFO: Execute 'update-grml-rescueboot' to download and integrate a Grml ISO."
20 if ! which update-grub >/dev/null 2>&1; then
21 echo "WARN: ISOs found inside ${ISO_LOCATION} but update-grub not present (huh?)"
25 if ! [ -e /boot/grub/grub.cfg ] ; then
26 echo "WARN: ISOs found inside ${ISO_LOCATION} but /boot/grub/grub.cfg does not exist."
27 echo "WARN: Ignoring request to run update-grub to avoid possible boot loader problems."
31 echo "INFO: ISOs found inside ${ISO_LOCATION}, invoking update-grub:"
40 abort-upgrade|abort-remove|abort-deconfigure)
44 echo "postinst called with unknown argument \`$1'" >&2