From 5d6102a00ea3785b8f990ee63a72d3812b6bedab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Fri, 2 Feb 2018 11:27:04 +0100 Subject: [PATCH] enh: show kernel version in offline mode --- spectre-meltdown-checker.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index ba4ccef..fe5c7e1 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -996,13 +996,15 @@ if [ -z "$vmlinux" ] || [ ! -r "$vmlinux" ]; then else vmlinux_version=$(strings "$vmlinux" 2>/dev/null | grep '^Linux version ' | head -1) if [ -n "$vmlinux_version" ]; then - _verbose "Kernel image is \033[35m$vmlinux_version" # in live mode, check if the img we found is the correct one if [ "$opt_live" = 1 ]; then + _verbose "Kernel image is \033[35m$vmlinux_version" if ! echo "$vmlinux_version" | grep -qF "$(uname -r)" || \ ! echo "$vmlinux_version" | grep -qF "$(uname -v)"; then _warn "Possible disrepancy between your running kernel and the image we found ($opt_kernel), results might be incorrect" fi + else + _info "Kernel image is \033[35m$vmlinux_version" fi fi fi