HenriWahl / checkmk-agent-plugin-yum

Checks for updates on RPM-based distributions via yum.
GNU General Public License v2.0
24 stars 22 forks source link

Correctly match kernel #1

Closed rjsalts closed 7 years ago

rjsalts commented 8 years ago

When comparing the latest version of the kernel installed with the latest kernel the match was not correct

e.g. the running kernel gives 3.10.0-327.28.3.el7.x86_64 and the version as shown in yum is 3.10.0-327.28.3.el7

HenriWahl commented 8 years ago

Thank for you contribution, but I wonder, if the the difference at the tail of the version string is not caught by the * anyway?

HenriWahl commented 8 years ago

Doesn't treating the kernel strings as regexp make the strings fuzzier because the dots "." are evaluated by regexp?

rjsalts commented 7 years ago

The thought the trailing * wouldn't match unless you're doing a =~, which was the problem. You're right about the dots in the regex. Just having rerun this plugin it seems to be working without this change. I'm not sure what issue I was running into before.