dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0149-Add-version-field-to-BLS-generated-by-grub2-switch-t.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Javier Martinez Canillas <javierm@redhat.com>
8631a2
Date: Thu, 10 May 2018 10:52:11 +0200
8631a2
Subject: [PATCH] Add version field to BLS generated by grub2-switch-to-blscfg
8631a2
8631a2
The version field is present in the BLS fragments that are shipped in the
8631a2
kernel packages, so add it to the BLS generated by grub2-switch-to-blscfg
8631a2
for consistency.
8631a2
8631a2
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8631a2
---
8631a2
 util/grub-switch-to-blscfg.in | 3 +++
8631a2
 1 file changed, 3 insertions(+)
8631a2
8631a2
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
8631a2
index bc28053cd30..89487ad611c 100644
8631a2
--- a/util/grub-switch-to-blscfg.in
8631a2
+++ b/util/grub-switch-to-blscfg.in
8631a2
@@ -190,12 +190,14 @@ mkbls() {
8631a2
     local datetime=$1 && shift
8631a2
 
8631a2
     local debugname=""
8631a2
+    local debugid=""
8631a2
     local flavor=""
8631a2
 
8631a2
     if [[ "$kernelver" == *\+* ]] ; then
8631a2
         local flavor=-"${kernelver##*+}"
8631a2
         if [[ "${flavor}" == "-debug" ]]; then
8631a2
             local debugname=" with debugging"
8631a2
+            local debugid="-debug"
8631a2
         fi
8631a2
     fi
8631a2
     (
8631a2
@@ -203,6 +205,7 @@ mkbls() {
8631a2
 
8631a2
         cat <
8631a2
 title ${NAME} (${kernelver}) ${VERSION}${debugname}
8631a2
+version ${kernelver}${debugid}
8631a2
 linux /vmlinuz-${kernelver}
8631a2
 initrd /initramfs-${kernelver}.img
8631a2
 options \$kernelopts