From 8359a3ebd9fcb5324a645fe147030482f35437b4 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Sat, 29 Jun 2019 16:15:14 +0800 Subject: [PATCH] tweak search location of new-kernel-pkg In OE, it locates /sbin rather than /usr/sbin Upstream-Status: Inappropriate [oe specific] Signed-off-by: Hongxu Jia --- pyanaconda/payload/__init__.py | 2 +- pyanaconda/payload/livepayload.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyanaconda/payload/__init__.py b/pyanaconda/payload/__init__.py index 4fb40cb..8b48625 100644 --- a/pyanaconda/payload/__init__.py +++ b/pyanaconda/payload/__init__.py @@ -563,7 +563,7 @@ class Payload(metaclass=ABCMeta): :returns: None """ - if os.path.exists(util.getSysroot() + "/usr/sbin/new-kernel-pkg"): + if os.path.exists(util.getSysroot() + "/sbin/new-kernel-pkg"): use_dracut = False else: log.warning("new-kernel-pkg does not exist - grubby wasn't installed? " diff --git a/pyanaconda/payload/livepayload.py b/pyanaconda/payload/livepayload.py index 235a3b5..6a8d345 100644 --- a/pyanaconda/payload/livepayload.py +++ b/pyanaconda/payload/livepayload.py @@ -200,7 +200,7 @@ class LiveImagePayload(Payload): util.execInSysroot("systemd-machine-id-setup", []) for kernel in self.kernel_version_list: - if not os.path.exists(util.getSysroot() + "/usr/sbin/new-kernel-pkg"): + if not os.path.exists(util.getSysroot() + "/sbin/new-kernel-pkg"): log.info("Regenerating BLS info for %s", kernel) util.execInSysroot("kernel-install", ["add", kernel, -- 2.7.4