Skip to content

Commit

Permalink
Fix the rescue kernel version list in writeBootLoader (#1201429)
Browse files Browse the repository at this point in the history
The list is supposed to contain versions, not full paths.
  • Loading branch information
dashea committed Mar 12, 2015
1 parent bdb4a0f commit c98a0bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyanaconda/bootloader.py
Expand Up @@ -2395,8 +2395,10 @@ def writeBootLoader(storage, payload, instClass, ksdata):
# get a list of installed kernel packages
# add whatever rescue kernels we can find to the end
kernel_versions = list(payload.kernelVersionList)
kernel_versions += glob(iutil.getSysroot() + "/boot/vmlinuz-*-rescue-*")
kernel_versions += glob(iutil.getSysroot() + "/boot/efi/EFI/%s/vmlinuz-*-rescue-*" % instClass.efi_dir)

rescue_versions = glob(iutil.getSysroot() + "/boot/vmlinuz-*-rescue-*")
rescue_versions += glob(iutil.getSysroot() + "/boot/efi/EFI/%s/vmlinuz-*-rescue-*" % instClass.efi_dir)
kernel_versions += (f.split("/")[-1][8:] for f in rescue_versions)

if not kernel_versions:
log.warning("no kernel was installed -- boot loader config unchanged")
Expand Down

0 comments on commit c98a0bf

Please sign in to comment.