From 59ad3127731687a8d66c1d2dcf77a3260f9d4532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 19 Nov 2019 22:35:08 +0100 Subject: [PATCH] fix: msr: fix msr module detection under Ubuntu 19.10 (fixes #316) --- spectre-meltdown-checker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index c7254ac..2c3e1bf 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -1176,7 +1176,7 @@ mount_debugfs() load_msr() { if [ "$os" = Linux ]; then - if ! grep -e msr "$procfs/modules" 2>/dev/null; then + if ! grep -qw msr "$procfs/modules" 2>/dev/null; then modprobe msr 2>/dev/null && insmod_msr=1 _debug "attempted to load module msr, insmod_msr=$insmod_msr" else @@ -1195,7 +1195,7 @@ load_msr() load_cpuid() { if [ "$os" = Linux ]; then - if ! grep -e cpuid "$procfs/modules" 2>/dev/null; then + if ! grep -qw cpuid "$procfs/modules" 2>/dev/null; then modprobe cpuid 2>/dev/null && insmod_cpuid=1 _debug "attempted to load module cpuid, insmod_cpuid=$insmod_cpuid" else