Fix linux-image package check for Debian/jessie 32bit
authorMichael Prokop <mika@grml.org>
Mon, 13 Oct 2014 18:46:23 +0000 (20:46 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 13 Oct 2014 19:06:11 +0000 (21:06 +0200)
The linux-image-686 package no longer exists in jessie,
instead we have to use linux-image-686-pae nowadays.

Thanks: Patrick Schleizer <adrelanos@riseup.net> for the bug report
Fixes #32 @ github

chroot-script

index eeb62cf..1a74aef 100755 (executable)
@@ -304,9 +304,19 @@ get_kernel_version() {
     return 0
   fi
 
-  case $ARCH in
-    i386)   KARCH=686   ;;
-    amd64)  KARCH=amd64 ;;
+  local KARCH
+
+  case "$ARCH" in
+    i386)
+      case "$RELEASE" in
+        lenny|squeeze|wheezy) KARCH='686' ;;
+        # since jessie the linux-image-686 image doesn't exist any longer
+        *) KARCH='686-pae' ;;
+      esac
+      ;;
+    amd64)
+      KARCH='amd64'
+      ;;
     *)
       echo "Only i386 and amd64 are currently supported" >&2
       return 1