Explorar el Código

Merge branch 'mhjacks-fix-grep'

Sebastian Wolf hace 2 años
padre
commit
f47c8dd387
Se han modificado 3 ficheros con 4 adiciones y 2 borrados
  1. 1 0
      NEWS
  2. 1 0
      THANKS.in
  3. 2 2
      plugins-scripts/check_sensors.sh

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
 2.4.5 2023-05-15
 	FIXES
 	check_dns: Fix buffer overflow on Ubuntu 22.04 (#699)
+	check_sensors: Use grep instead of deprecated egrep (#697)
 	check_tcp: Add --sni as an alias to -N (#701)
 	build: fix bug when using VPATH builds (#700)
 

+ 1 - 0
THANKS.in

@@ -259,6 +259,7 @@ Mark Keisler
 Markus Baertschi
 Marlo Bell
 Martin Foster
+Martin Jackson
 Matej Vela
 Mathieu Arnold
 Mathieu Masseboeuf

+ 2 - 2
plugins-scripts/check_sensors.sh

@@ -60,10 +60,10 @@ case "$1" in
 		elif [ "$status" != 0 ] ; then
 			text="WARNING - sensors returned state $status"
 			exit=$STATE_WARNING
-		elif echo "${sensordata}" | egrep -q ALARM >/dev/null ; then
+		elif echo "${sensordata}" | grep -q ALARM >/dev/null ; then
 			text="SENSOR CRITICAL - Sensor alarm detected!"
 			exit=$STATE_CRITICAL
-		elif [ $ignorefault -eq 0 ] && echo "${sensordata}" | egrep -q FAULT  >/dev/null; then
+		elif [ $ignorefault -eq 0 ] && echo "${sensordata}" | grep -q FAULT  >/dev/null; then
 			text="SENSOR UNKNOWN - Sensor reported fault"
 			exit=$STATE_UNKNOWN
 		else