From f4ad0a5814e8b62eda1f80d6e1266bd11d84015b Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Mon, 31 Mar 2014 23:55:29 -0400 Subject: [PATCH] Look for kernel in image, not in root --- source/steps/ChainBootNode.py | 2 +- source/steps/ValidateNodeInstall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/steps/ChainBootNode.py b/source/steps/ChainBootNode.py index 5dec739..ee54c53 100644 --- a/source/steps/ChainBootNode.py +++ b/source/steps/ChainBootNode.py @@ -166,7 +166,7 @@ def Run( vars, log ): major_version = int(kversion[0]) # Check if the string looks like a kernel version except: # Try a different method for non-rpm-based distributions - kversion = os.popen("ls -lrt /lib/modules | tail -1 | awk '{print $9;}'").read().rstrip() + kversion = os.popen("ls -lrt %s/lib/modules | tail -1 | awk '{print $9;}'"%SYSIMG_PATH).read().rstrip() utils.sysexec( "cp %s/boot/vmlinuz-%s /tmp/kernel" % (SYSIMG_PATH,kversion), log ) candidates=[] diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index 111ba26..4ae1ff8 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -156,7 +156,7 @@ def Run( vars, log ): os.stat("%s/boot/vmlinuz-%s" % (SYSIMG_PATH,kversion)) major_version = int(kversion[0]) # Check if the string looks like a kernel version except: - kversion = os.popen("ls -lrt /lib/modules | tail -1 | awk '{print $9;}'").read().rstrip() + kversion = os.popen("ls -lrt %s/lib/modules | tail -1 | awk '{print $9;}'"%SYSIMG_PATH).read().rstrip() except OSError, e: log.write( "Couldn't locate base kernel (you might be using the stock kernel).\n") return -3 -- 2.43.0