diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2022-10-07 11:44:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 11:44:47 +0200 |
commit | 1ec6b162cb4e9fb96dcc45319b62fc7e2b3c8726 (patch) | |
tree | ad557fce2f821ec5de384e0cb156a8fbc6c6e1fc /plugins-scripts | |
parent | b90a5757f77cdc0434fa3f45cf59c63b9e695d90 (diff) | |
download | monitoring-plugins-1ec6b162cb4e9fb96dcc45319b62fc7e2b3c8726.tar.gz |
Replace egrep with grep -E (#1791)
Replace egrep with grep -E to avoid the deprecation warnings
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-x | plugins-scripts/check_sensors.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins-scripts/check_sensors.sh b/plugins-scripts/check_sensors.sh index ab4e726e..921e7b36 100755 --- a/plugins-scripts/check_sensors.sh +++ b/plugins-scripts/check_sensors.sh @@ -49,10 +49,10 @@ case "$1" in elif test "${status}" -ne 0; then text="WARNING - sensors returned state $status" exit=$STATE_WARNING - elif echo "${sensordata}" | egrep ALARM > /dev/null; then + elif echo "${sensordata}" | grep -E ALARM > /dev/null; then text="SENSOR CRITICAL - Sensor alarm detected!" exit=$STATE_CRITICAL - elif echo "${sensordata}" | egrep FAULT > /dev/null \ + elif echo "${sensordata}" | grep -E FAULT > /dev/null \ && test "$1" != "-i" -a "$1" != "--ignore-fault"; then text="SENSOR UNKNOWN - Sensor reported fault" exit=$STATE_UNKNOWN |