grub_install: remove pre-jessie code
authorChris Hofstaedtler <chris@hofstaedtler.name>
Mon, 13 Nov 2023 22:28:55 +0000 (23:28 +0100)
committerChris Hofstaedtler <chris@hofstaedtler.name>
Fri, 17 Nov 2023 15:25:08 +0000 (16:25 +0100)
chroot-script
grml-debootstrap

index ace535f..ad23449 100755 (executable)
@@ -730,26 +730,13 @@ grub_install() {
      done
      rm -f /boot/grub/device.map
   else
-     echo "Installing grub on ${GRUB}:"
-     case "$RELEASE" in
-       lenny|squeeze|wheezy)
-         local grub_dev
-         grub_dev="$(readlink -f "${GRUB}")"
-         if ! grub-install --no-floppy "${grub_dev}" ; then
-           echo "Error: failed to execute 'grub-install --no-floppy ${grub_dev}'." >&2
-           exit 1
-         fi
-         rm -f /boot/grub/device.map
-         ;;
-       *)
-         echo "(hd0) ${GRUB}" > /boot/grub/device.map
-         if ! grub-install "(hd0)" ; then
-           echo "Error: failed to execute 'grub-install (hd0)'." >&2
-           exit 1
-         fi
-         rm /boot/grub/device.map
-         ;;
-     esac
+    echo "Installing grub on ${GRUB}:"
+    echo "(hd0) ${GRUB}" > /boot/grub/device.map
+    if ! grub-install "(hd0)" ; then
+      echo "Error: failed to execute 'grub-install (hd0)'." >&2
+      exit 1
+    fi
+    rm /boot/grub/device.map
   fi
 
   echo "Adjusting grub configuration for use on ${GRUB}."
index 00ce363..513c27b 100755 (executable)
@@ -1618,15 +1618,7 @@ grub_install() {
       eerror "Error: grub not installed inside Virtual Machine. Can not install bootloader." ; eend 1
       bailout 1
     fi
-
-    case "$RELEASE" in
-      lenny|squeeze|wheezy)
-        cp "${MNTPOINT}"/usr/lib/grub/i386-pc/* "${MNTPOINT}/boot/grub/"
-        ;;
-      *)
-        cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/"
-        ;;
-    esac
+    cp -a "${MNTPOINT}"/usr/lib/grub/i386-pc "${MNTPOINT}/boot/grub/"
 
     if [ -n "$VMEFI" ]; then