Minor packaging updates, ACKed by Jimmy.
[grml-rescueboot.git] / debian / postinst
index 29a15d8..99343dc 100644 (file)
@@ -1,26 +1,17 @@
 #!/bin/sh
 # postinst script for grml-rescueboot
-#
-# see: dh_installdeb(1)
 
 set -e
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
     configure)
-      update-grub
+      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)
@@ -32,9 +23,6 @@ case "$1" in
     ;;
 esac
 
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
 #DEBHELPER#
 
 exit 0