From 3cfd532382bac5dd6bbd6fa6a6f413ca1640b289 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 8 Aug 2017 14:41:43 -0700 Subject: [PATCH] IsoMountpoint: Add ppc64le kernel to search (#1373358) Resolves: rhbz#1373358 --- src/sbin/livemedia-creator | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 8550c608..ca59d7fe 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -206,9 +206,8 @@ class IsoMountpoint(object): else: self.mount_dir = self.initrd_path - self.kernel = self.mount_dir+"/isolinux/vmlinuz" - self.initrd = self.mount_dir+"/isolinux/initrd.img" - + kernel_list = [("/isolinux/vmlinuz", "/isolinux/initrd.img"), + ("/ppc/ppc64/vmlinuz", "/ppc/ppc64/initrd.img")] if os.path.isdir( self.mount_dir+"/repodata" ): self.repo = self.mount_dir else: @@ -216,9 +215,15 @@ class IsoMountpoint(object): self.liveos = os.path.isdir( self.mount_dir+"/LiveOS" ) try: - for f in [self.kernel, self.initrd]: - if not os.path.isfile(f): - raise Exception("Missing file on iso: {0}".format(f)) + for kernel, initrd in kernel_list: + if (os.path.isfile(self.mount_dir+kernel) and + os.path.isfile(self.mount_dir+initrd)): + self.kernel = self.mount_dir+kernel + self.initrd = self.mount_dir+initrd + break + else: + raise Exception("Missing kernel and initrd file in iso, failed" + " to search under: {0}".format(kernel_list)) except: self.umount() raise