grubby-bls should only check if kernel exists and not if was installed
When a new BLS entry is added, the script checks if the kernel image exists and also if it was installed from a rpm package. But the latter isn't really needed, it should be valid to just copy a kernel image and add a BLS entry. Resolves: rhbz#1634740 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
b8c8cdcf6c
commit
f9880644e6
@ -159,7 +159,7 @@ param_to_indexes() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for i in ${!bls_file[@]}; do
|
for i in ${!bls_file[@]}; do
|
||||||
if [[ $param = "${bls_linux[$i]}" ]]; then
|
if [[ $param = "${bls_linux[$i]}" || "/${param##*/}" = "${bls_linux[$i]}" ]]; then
|
||||||
indexes="$indexes $i"
|
indexes="$indexes $i"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -247,11 +247,12 @@ add_bls_fragment() {
|
|||||||
|
|
||||||
if [[ $kernel = *"vmlinuz-"* ]]; then
|
if [[ $kernel = *"vmlinuz-"* ]]; then
|
||||||
kernelver="${kernel##*/vmlinuz-}"
|
kernelver="${kernel##*/vmlinuz-}"
|
||||||
|
prefix="vmlinuz-"
|
||||||
else
|
else
|
||||||
kernelver="${kernel##*/}"
|
kernelver="${kernel##*/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "/lib/modules/${kernelver}" || ! -f "/boot/vmlinuz-${kernelver}" ]] &&
|
if [[ ! -f "/boot/${prefix}${kernelver}" ]] &&
|
||||||
[[ $bad_image != "true" ]]; then
|
[[ $bad_image != "true" ]]; then
|
||||||
print_error "The ${kernelver} kernel isn't installed in the machine"
|
print_error "The ${kernelver} kernel isn't installed in the machine"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user