fix: msr: fix msr module detection under Ubuntu 19.10 (fixes #316)

This commit is contained in:
Stéphane Lesimple 2019-11-19 22:35:08 +01:00
parent 418533c47e
commit 59ad312773
1 changed files with 2 additions and 2 deletions

View File

@ -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