blob: 47d42c6f07911f0359391d35319b1c050ea3bc88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
--- check_oracle 2011-08-09 20:28:19.000000000 +0200
+++ /check_oracle_tns_stringmatchfixed 2011-08-09 20:28:14.000000000 +0200
@@ -133,7 +133,7 @@
tnschk=` tnsping $2`
tnschk2=` echo $tnschk | grep -c OK`
if [ ${tnschk2} -eq 1 ] ; then
- tnschk3=` echo $tnschk | sed -e 's/.*(//' -e 's/).*//'`
+ tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
echo "OK - reply time ${tnschk3} from $2"
exit $STATE_OK
else
|