Look for kernel in image, not in root
authorSapan Bhatia <gwsapan@gmail.com>
Tue, 1 Apr 2014 03:55:29 +0000 (23:55 -0400)
committerSapan Bhatia <gwsapan@gmail.com>
Tue, 1 Apr 2014 03:55:29 +0000 (23:55 -0400)
source/steps/ChainBootNode.py
source/steps/ValidateNodeInstall.py

index 5dec739..ee54c53 100644 (file)
@@ -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=[]
index 111ba26..4ae1ff8 100644 (file)
@@ -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