From e7938c19e6a374165761451603801469136a7c11 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 20 Nov 2016 16:23:17 +0100 Subject: [PATCH] [KRNL-5830] Improved logging --- include/tests_kernel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/tests_kernel b/include/tests_kernel index 9938554f..be9d82fc 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -537,7 +537,7 @@ VERSION_ON_DISK=$(${FILEBINARY} -b ${ROOTDIR}boot/vmlinuz-linux | ${AWKBINARY} '{ if ($1=="Linux" && $7=="version") { print $8 }}') if [ ! -z "${VERSION_ON_DISK}" ]; then LogText "Result: found version ${VERSION_ON_DISK}" - ACTIVE_KERNEL=`uname -r` + ACTIVE_KERNEL=$(uname -r) LogText "Result: active kernel version ${ACTIVE_KERNEL}" if [ "${VERSION_ON_DISK}" = "${ACTIVE_KERNEL}" ]; then REBOOT_NEEDED=0 @@ -576,7 +576,7 @@ # Examples: # /boot/kernel-genkernel-x86_64-3.14.14-gentoo KERNELS=$(${LSBINARY} ${ROOTDIR}boot/kernel* | ${AWKBINARY} -F- '{ if ($2=="genkernel") { print $4 }}' | ${GREPBINARY} "^[0-9]" | ${SORTBINARY} -n -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -t \.) - LogText "Output: ${KERNELS}" + if [ ! -z "${KERNELS}" ]; then LogText "Output: ${KERNELS}"; fi else ReportException "${TEST_NO}:2" "Can not find any vmlinuz or kernel files in /boot, which is unexpected" fi @@ -621,7 +621,7 @@ AddHP 5 5 elif [ ${REBOOT_NEEDED} -eq 1 ]; then Display --indent 2 --text "- Check if reboot is needed" --result "${STATUS_YES}" --color RED - ReportWarning ${TEST_NO} "Reboot of system is most likely needed" + ReportWarning ${TEST_NO} "Reboot of system is most likely needed" "" "text:reboot" AddHP 0 5 else Display --indent 2 --text "- Check if reboot is needed" --result "${STATUS_UNKNOWN}" --color YELLOW