| 1 |
From 75a6f801a18961b1abd169046a105813da6c3424 Mon Sep 17 00:00:00 2001 |
| 2 |
From: ZyanKLee <[email protected]> |
| 3 |
Date: Thu, 28 Apr 2016 12:51:42 +0200 |
| 4 |
Subject: [PATCH] operator string, siglvl |
| 5 |
|
| 6 |
operator string has a " at the end, too - removing it |
| 7 |
siglvl at our modem is 31.99 - but still works |
| 8 |
--- |
| 9 |
check_smstools/bin/check_smstools | 3 ++- |
| 10 |
1 file changed, 2 insertions(+), 1 deletion(-) |
| 11 |
|
| 12 |
Index: pkg-nagios-plugins-contrib/check_smstools/bin/check_smstools |
| 13 |
=================================================================== |
| 14 |
--- pkg-nagios-plugins-contrib.orig/check_smstools/bin/check_smstools |
| 15 |
+++ pkg-nagios-plugins-contrib/check_smstools/bin/check_smstools |
| 16 |
@@ -191,6 +191,7 @@ sub process_statusfile { |
| 17 |
if ($result{'cmd'} =~ /$operator_command/) { |
| 18 |
$operator = $result{'answer'}; |
| 19 |
$operator =~ s/0,0,"//g; |
| 20 |
+ $operator =~ s/"$//g; |
| 21 |
} |
| 22 |
} |
| 23 |
# No need to parse the rest of the file, if signal |
| 24 |
@@ -218,7 +219,7 @@ sub check_signal { |
| 25 |
$np->nagios_die("Unable to determine the modem signal strength."); |
| 26 |
} |
| 27 |
|
| 28 |
- if (($siglvl < 0) or ($siglvl > 31)) { |
| 29 |
+ if (($siglvl < 0) or ($siglvl > 32)) { |
| 30 |
$np->nagios_die("Unable to determine the modem signal strength."); |
| 31 |
} |
| 32 |
|