grubby-bls: use id instead of title to get the default entry

The wrapper is using the title before to store the default entry, but we
are now using the entry id for grub2, so make the wrapper query the id.

Resolves: rhbz#1638103

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-10-19 18:13:38 +02:00
parent 7d53b5e0a6
commit db3ffac800
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
1 changed files with 2 additions and 2 deletions

View File

@ -127,13 +127,13 @@ get_default_index() {
# GRUB2 and zipl use different fields to set the default entry
if [[ $bootloader = "grub2" ]]; then
title="$default"
id="$default"
else
version="$default"
fi
for i in ${!bls_file[@]}; do
if [[ $title = ${bls_title[$i]} || $version = ${bls_version[$i]} ||
if [[ $title = ${bls_title[$i]} || $id = ${bls_id[$i]} ||
$i -eq $index ]]; then
echo $i
return