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: Please create ${ISO_LOCATION} and place rescue ISO(s) there."
17 echo "INFO: Finally invoke update-grub and enjoy your rescue system."
21 if ! which update-grub >/dev/null 2>&1; then
22 echo "WARN: ISOs found inside ${ISO_LOCATION} but update-grub not present (huh?)"
26 if ! [ -e /boot/grub/grub.cfg ] ; then
27 echo "WARN: ISOs found inside ${ISO_LOCATION} but /boot/grub/grub.cfg does not exist."
28 echo "WARN: Ignoring request to run update-grub to avoid possible boot loader problems."
32 echo "INFO: ISOs found inside ${ISO_LOCATION}, invoking update-grub:"
41 abort-upgrade|abort-remove|abort-deconfigure)
45 echo "postinst called with unknown argument \`$1'" >&2