From a0f473f5e96ac92247e18eb082c05474689e2f82 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sun, 29 Apr 2012 17:21:14 +0000 Subject: Add support in check_kernel_version for any 3.X kernel. --- nagios-plugins/check_kernel_status | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nagios-plugins/check_kernel_status') diff --git a/nagios-plugins/check_kernel_status b/nagios-plugins/check_kernel_status index 59bbc49..0721f5c 100755 --- a/nagios-plugins/check_kernel_status +++ b/nagios-plugins/check_kernel_status @@ -58,14 +58,14 @@ else } # Next, find the installed kernel version -# Yes, as you can see, it is limited to 2.6 and 3.0 kernels here. +# Yes, as you can see, it is limited to 2.6 and 3.X kernels here. # But I assume that you don't need reboots anymore when this major # version has passed. my $dpkg_list = `COLUMNS=1024 dpkg -l`; my $dpkg; for my $line (split("\n", $dpkg_list)) { chomp $line; - $dpkg = $line if ($line =~ m/^ii.+linux-image-(2.6|3.0)/); + $dpkg = $line if ($line =~ m/^ii.+linux-image-(2.6|3.\d)/); } # Now, which OS is it, and which footprint do they use? -- cgit v1.2.3