grubby-bls: fix --default-* options for s390x

On s390x the version field is used to set the default BLS entry.

Resolves: rhbz#1644608

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-11-02 00:44:51 +01:00
parent 9a80bb6f8e
commit 2ef6823a35
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -133,8 +133,17 @@ get_default_index() {
fi
for i in ${!bls_file[@]}; do
if [[ $title = ${bls_title[$i]} || $id = ${bls_id[$i]} ||
$i -eq $index ]]; then
if [[ $i -eq $index ]]; then
echo $i
return
fi
if [[ $bootloader = "grub2" && $id = ${bls_id[$i]} ]]; then
echo $i
return
fi
if [[ $bootloader = "zipl" && $version = ${bls_version[$i]} ]]; then
echo $i
return
fi