grub2/0258-10_linux_bls-use-grub2-rpm-sort-instead-of-ls-vr-to-.patch
Javier Martinez Canillas 1f092caba7
Drop two efinet patches that were causing issues and a bunch of other fixes
Add comments and revert logic changes in 01_fallback_counting
Remove quotes when reading ID value from /etc/os-release
  Related: rhbz#1650706
blscfg: expand grub_users before passing to grub_normal_add_menu_entry()
  Resolves: rhbz#1650706
Drop buggy downstream patch "efinet: retransmit if our device is busy"
  Resolves: rhbz#1649048
Make the menu entry users option argument to be optional
  Related: rhbz#1652434
10_linux_bls: add missing menu entries options
  Resolves: rhbz#1652434
Drop "Be more aggro about actually using the *configured* network device."
  Resolves: rhbz#1654388
Fix menu entry selection based on title
  Resolves: rhbz#1654936

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-01 03:28:36 +01:00

44 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Tue, 16 Oct 2018 15:48:15 +0200
Subject: [PATCH] 10_linux_bls: use grub2-rpm-sort instead of ls -vr to sort
entries
Using ls -vr is wrong since it's not the same than the RPM sort algorithm.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub.d/10_linux_bls.in | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in
index 8a3379578bd..1bc97f29898 100644
--- a/util/grub.d/10_linux_bls.in
+++ b/util/grub.d/10_linux_bls.in
@@ -151,10 +151,22 @@ read_config()
populate_menu()
{
- entries_path="/boot/loader/entries"
+ blsdir="/boot/loader/entries"
+ local -a files
+ local IFS=$'\n'
gettext_printf "Generating boot entries from BLS files...\n" >&2
- for config in $(ls -v -r $entries_path/*.conf); do
- read_config ${config}
+
+ files=($(for bls in ${blsdir}/*.conf ; do
+ if ! [[ -e "${bls}" ]] ; then
+ continue
+ fi
+ bls="${bls%.conf}"
+ bls="${bls##*/}"
+ echo "${bls}"
+ done | ${kernel_sort} | tac)) || :
+
+ for bls in "${files[@]}" ; do
+ read_config "${blsdir}/${bls}.conf"
menu="${menu}menuentry '${title}' {\n"
menu="${menu}\t linux ${linux} ${options}\n"
if [ -n "${initrd}" ] ; then