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 | |||
49 | elif test "${status}" -ne 0; then | 49 | elif test "${status}" -ne 0; then |
50 | text="WARNING - sensors returned state $status" | 50 | text="WARNING - sensors returned state $status" |
51 | exit=$STATE_WARNING | 51 | exit=$STATE_WARNING |
52 | elif echo "${sensordata}" | egrep ALARM > /dev/null; then | 52 | elif echo "${sensordata}" | grep -E ALARM > /dev/null; then |
53 | text="SENSOR CRITICAL - Sensor alarm detected!" | 53 | text="SENSOR CRITICAL - Sensor alarm detected!" |
54 | exit=$STATE_CRITICAL | 54 | exit=$STATE_CRITICAL |
55 | elif echo "${sensordata}" | egrep FAULT > /dev/null \ | 55 | elif echo "${sensordata}" | grep -E FAULT > /dev/null \ |
56 | && test "$1" != "-i" -a "$1" != "--ignore-fault"; then | 56 | && test "$1" != "-i" -a "$1" != "--ignore-fault"; then |
57 | text="SENSOR UNKNOWN - Sensor reported fault" | 57 | text="SENSOR UNKNOWN - Sensor reported fault" |
58 | exit=$STATE_UNKNOWN | 58 | exit=$STATE_UNKNOWN |