فهرست منبع

Update check_ntp.pl

offset can also be positive, so need to add "+" to regex match in line 217 to capture proper $offset value
DarkNinja77 2 سال پیش
والد
کامیت
57397df36c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      plugins-scripts/check_ntp.pl

+ 1 - 1
plugins-scripts/check_ntp.pl

@@ -214,7 +214,7 @@ while (<NTPDATE>) {
 		$stratum = $1;
 		$stratum = $1;
 	}
 	}
 	
 	
-	if (/(offset|adjust)\s+([-.\d]+)/i) {
+	if (/(offset|adjust)\s+([-+.\d]+)/i) {
 		$offset = $2;
 		$offset = $2;
 
 
 		# An offset of 0.000000 with an error is probably bogus. Actually,
 		# An offset of 0.000000 with an error is probably bogus. Actually,