From: Sapan Bhatia Date: Tue, 1 Apr 2014 03:55:29 +0000 (-0400) Subject: Look for kernel in image, not in root X-Git-Tag: bootmanager-5.2-5~1^2~12 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=f4ad0a5814e8b62eda1f80d6e1266bd11d84015b Look for kernel in image, not in root --- 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