summarylogtreecommitdiffstats
path: root/grub-linux-rt-default-hook.patch
blob: e13739c1929572f0a80716f174aaac4247f467e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- /etc/grub.d/10_linux
+++ /etc/grub.d/10_linux
@@ -194,8 +194,19 @@
 submenu_indentation=""
 
 is_top_level=true
+default_kernel_grabbed=false
+default_kernel_name="/boot/vmlinuz-linux-rt"
 while [ "x$list" != "x" ] ; do
   linux=`version_find_latest $list`
+  if [ "x$default_kernel_grabbed" = xfalse ] ; then
+    for i in $list; do
+      if [ "x$i" = "x$default_kernel_name" ] ; then
+        linux="$default_kernel_name"
+        break
+      fi
+    done
+    default_kernel_grabbed=true
+  fi
   gettext_printf "Found linux image: %s\n" "$linux" >&2
   basename=`basename $linux`
   dirname=`dirname $linux`