1 changed file
check_mapr_license.pl | ||
Add comment 16
Add comment 17 Raises warning on trial license unless setting --trial-ok
Add comment 18
Add comment 19 Minus Tested on MapR 3.1.0, 4.0.1, 5.1.0";
Add comment 19 Plus Tested on MapR 3.1.0, 4.0.1, 5.1.0, 5.2.1";
Add comment 20
Add comment 21 Minus $VERSION = "0.1.1";
Add comment 21 Plus $VERSION = "0.2.0";
Add comment 22
Add comment 23 use strict;
Add comment 24 use warnings;
Add comment 65
Add comment 66 foreach(@data){
Add comment 67 my $desc = get_field2($_, "description");
Add comment 68 Minus next if($desc eq "MapR Base Edition");
Add comment 68 Plus debug "description: $desc";
Add comment 69 Plus next if($desc =~ /MapR Base Edition|Base MapR POSIX Client/);
Add comment 69 70 unless($trial_ok){
Add comment 70 71 warning if $desc =~ /trial|evaluation/i;
Add comment 71 72 }
Add comment 72 73 #$msg .= "version: " . get_field2($_, "license") . ", ";
Add comment 73 Minus my $expiry = get_field2($_, "expiry");
Add comment 74 Plus my $expiry;
Add comment 75 Plus #if(defined($_->{"expiry"})){
Add comment 76 Plus $expiry = get_field2($_, "expiry");
Add comment 74 77 $expiry =~ /^(\w+)\s+(\d{1,2}),\s*(\d{4})$/ or quit "UNKNOWN", "expiry is not in the expected format. $nagios_plugins_support_msg_api";
Add comment 78 Plus #} elsif(defined($_->{"expdateStr"})){
Add comment 79 Plus # $expiry = get_field2($_, "expdateStr");
Add comment 80 Plus # $expiry =~ /^\w{3} (\w{3}) (\d{2}) .+ (\d{4})\s*$/ or quit "UNKNOWN", "expdateStr is not in the expected format. $nagios_plugins_support_msg_api";
Add comment 81 Plus #} else {
Add comment 82 Plus # quit "UNKNOWN", "neither 'expiry' nor expdateStr fields found. $nagios_plugins_support_msg_api";
Add comment 83 Plus #}
Add comment 75 84 my $month = month2int($1);
Add comment 76 85 my $day = $2;
Add comment 77 86 my $year = $3;