grubby-bls: fix --add-kernel not working when using the --args option

The script prints an error if --args option is used without --update-kernel
but it's also valid to use it with the --add-kernel option.

Resolves: rhbz#1691004

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2019-03-20 17:15:00 +01:00
parent 6fadbea615
commit 37f094c099
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
2 changed files with 6 additions and 2 deletions

View File

@ -734,7 +734,7 @@ while [ ${#} -gt 0 ]; do
shift
done
if [[ -z $update_kernel ]] && [[ -n $args || -n $remove_args ]]; then
if [[ -z $update_kernel && -z $kernel ]] && [[ -n $args || -n $remove_args ]]; then
print_error "no action specified"
fi

View File

@ -1,6 +1,6 @@
Name: grubby
Version: 8.40
Release: 29%{?dist}
Release: 30%{?dist}
Summary: Command line tool for updating bootloader configs
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
@ -127,6 +127,10 @@ current boot environment.
%{_mandir}/man8/*.8*
%changelog
* Thu Mar 21 2019 Javier Martinez Canillas <javierm@redhat.com> - 8.40-30
- grubby-bls: fix --add-kernel not working when using the --args option
Resolves: rhbz#1691004
* Mon Mar 11 2019 Javier Martinez Canillas <javierm@redhat.com> - 8.40-29
- Only switch to BLS config for s390x / zipl
Related: rhbz#1652806