diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:54:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:54:18 +0000 |
commit | 8e67fbf68ffeb9eb5f026dd482d73b021660bf9b (patch) | |
tree | bb573facd5d02096f9956b2617a722b88acaa8af /debian/patches/mkconfig-signed-kernel.patch | |
parent | Adding upstream version 2.06. (diff) | |
download | grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.tar.xz grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.zip |
Adding debian version 2.06-3~deb11u6.debian/2.06-3_deb11u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/mkconfig-signed-kernel.patch')
-rw-r--r-- | debian/patches/mkconfig-signed-kernel.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/mkconfig-signed-kernel.patch b/debian/patches/mkconfig-signed-kernel.patch new file mode 100644 index 0000000..aa93fad --- /dev/null +++ b/debian/patches/mkconfig-signed-kernel.patch @@ -0,0 +1,48 @@ +From 9eefe03f4b52e65cb4f372e0ff12a2b68cada425 Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Mon, 13 Jan 2014 12:13:21 +0000 +Subject: Generate configuration for signed UEFI kernels if available + +Forwarded: no +Last-Update: 2013-12-25 + +Patch-Name: mkconfig-signed-kernel.patch +--- + util/grub.d/10_linux.in | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 1603a75a7..1b8c6e146 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -161,8 +161,16 @@ linux_entry () + message="$(gettext_printf "Loading Linux %s ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF + echo '$(echo "$message" | grub_quote)' ++EOF ++ if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then ++ sed "s/^/$submenu_indentation/" << EOF ++ linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args} ++EOF ++ else ++ sed "s/^/$submenu_indentation/" << EOF + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} + EOF ++ fi + if test -n "${initrd}" ; then + # TRANSLATORS: ramdisk isn't identifier. Should be translated. + message="$(gettext_printf "Loading initial ramdisk ...")" +@@ -214,6 +222,13 @@ submenu_indentation="" + is_top_level=true + while [ "x$list" != "x" ] ; do + linux=`version_find_latest $list` ++ case $linux in ++ *.efi.signed) ++ # We handle these in linux_entry. ++ list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` ++ continue ++ ;; ++ esac + gettext_printf "Found linux image: %s\n" "$linux" >&2 + basename=`basename $linux` + dirname=`dirname $linux` |