livemedia-creator: Ignore rescue kernels

This commit is contained in:
Brian C. Lane 2013-04-16 16:28:47 -07:00
parent ffdd66b434
commit 67863bbf03
2 changed files with 7 additions and 2 deletions

View File

@ -111,7 +111,7 @@ passwd -d root > /dev/null
cat /dev/null > /dev/fstab
11. Don't delete initramfs files from /boot in %post
12. Have grub-efi, memtest86+ and syslinux in the package list
12. Have dracut-norescue, grub-efi, memtest86+ and syslinux in the package list
One drawback to using virt-install is that it pulls the packages from
the repo each time you run it. To speed things up you either need a local

View File

@ -360,9 +360,14 @@ class KernelInfo(object):
Get a list of the kernels in the boot_dir
Examine the vmlinuz-* versions and return a list of them
Ignore any with -rescue- in them, these are dracut rescue images.
The user shoud add dracut-norescue package to the kickstart to remove them,
but catch it here as well.
"""
files = os.listdir(self.boot_dir)
return [f[8:] for f in files if f.startswith("vmlinuz-")]
return [f[8:] for f in files if f.startswith("vmlinuz-") \
and f.find("-rescue-") == -1]
def get_kernel_arch(self):
"""