diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2020-10-21 15:40:30 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2020-10-21 15:40:30 +0300 |
commit | 71c474f4550667c055691421bf4241d5fbc53ab3 (patch) | |
tree | 8d1946e4e0b4115fd44cdfed3c5b9b9941e3be5e /include/tests_kernel | |
parent | 92df49d08e605e27941397f8057a3dc00890f35a (diff) |
[KRNL-5830] ignore rescue kernel on systems such as CentOS
Diffstat (limited to 'include/tests_kernel')
-rw-r--r-- | include/tests_kernel | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/tests_kernel b/include/tests_kernel index 7bd11e59..656048e9 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -665,8 +665,9 @@ LogText "Result: found ${ROOTDIR}boot/vmlinuz-linux-lts" FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux-lts else - # Match on /boot/vm5.3.7 or /boot/vmlinuz-5.3.7-1-default - FOUND_VMLINUZ=$(${LSBINARY} -t ${ROOTDIR}boot/vm[l0-9]* 2> /dev/null | ${HEADBINARY} -1) + # Match on items like /boot/vm5.3.7 or /boot/vmlinuz-5.3.7-1-default. Get newest file (ls -t and pipe into head) + # Note: ignore a rescue kernel (e.g. CentOS) + FOUND_VMLINUZ=$(${LSBINARY} -t ${ROOTDIR}boot/vm[l0-9]* 2> /dev/null | ${GREPBINARY} -v '\-rescue\-' | ${HEADBINARY} -1) LogText "Result: found ${FOUND_VMLINUZ}" fi |