summaryrefslogtreecommitdiffstats
path: root/web/attachments/66461-nagios-plugins-1.3.1-check-ntp.patch
blob: 32101d824de9ee8ae87c0d39c01d8b641d480d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff -ruN nagios-plugins-1.3.1/plugins-scripts/check_ntp.pl nagios-plugins-1.3.1-new/plugins-scripts/check_ntp.pl
--- nagios-plugins-1.3.1/plugins-scripts/check_ntp.pl	2003-05-19 11:16:05.000000000 +0100
+++ nagios-plugins-1.3.1-new/plugins-scripts/check_ntp.pl	2003-07-14 19:46:20.000000000 +0100
@@ -57,12 +57,19 @@
 #
 # Patch for for regex for stratum1 refid.
 
+BEGIN {
+	if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) {
+		$runtimedir = $1;
+		$PROGNAME = $2;
+	}
+}
+
 require 5.004;
 use POSIX;
 use strict;
 use Getopt::Long;
 use vars qw($opt_V $opt_h $opt_H $opt_w $opt_c $opt_j $opt_k $verbose $PROGNAME $def_jitter);
-use lib utils.pm; 
+use lib $main::runtimedir; 
 use utils qw($TIMEOUT %ERRORS &print_revision &support);
 
 $PROGNAME="check_ntp";
@@ -262,7 +269,7 @@
 			}
 
 			# match sys.peer or pps.peer
-			if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z.]+)\s+([-0-9.]+)\s+([lumb]+)\s+([-0-9m.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
+			if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z.]+)\s+([-0-9.]+)\s+([lumb]+)\s+([-0-9m.]+)\s+([-0-9.m]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
 				$syspeer = $2;
 				$stratum = $4;
 				$jitter = $11;