[Pkg-nagios-changes] [pkg-monitoring-plugins] 01/01: check_oracle: Fix --tns bad string matching - Adding 10_check_oracle_tns_bad_string.dpatch

Jan Wagner waja at moszumanska.debian.org
Sun Aug 3 12:46:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-monitoring-plugins.

commit b2a29995ab822f173127aed4225dc343e54cd26d
Author: Jan Wagner <waja at cyconet.org>
Date:   Sun Aug 3 14:45:55 2014 +0200

    check_oracle: Fix --tns bad string matching
    - Adding 10_check_oracle_tns_bad_string.dpatch
---
 debian/patches/00list                              |  1 +
 .../patches/10_check_oracle_tns_bad_string.dpatch  | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/00list b/debian/patches/00list
index 35b85ec..c41ae2e 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,2 +1,3 @@
 02_check_icmp_links.dpatch
 # commited upstream
+10_check_oracle_tns_bad_string.dpatch
diff --git a/debian/patches/10_check_oracle_tns_bad_string.dpatch b/debian/patches/10_check_oracle_tns_bad_string.dpatch
new file mode 100644
index 0000000..559fb73
--- /dev/null
+++ b/debian/patches/10_check_oracle_tns_bad_string.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_10_check_oracle_tns_bad_string.dpatch by Jan Wagner <waja at cyconet.org>
+##
+## DP: Create symlinks for check_icmp to provide default values for some situations
+
+From: Frederic Krueger
+Subject: Fix check_oracle --tns bad string matching
+
+check_oracle in the 1.4.15 release doesn't correctly parse the output gotten
+from at least Oracle 11 (with german locales). I guess it's probably more.
+Also it completely needlessly uses sed where basic bash string parsing actually
+does more than suffice (and does not run into possible problems with locales
+like sed ;)).
+
+Origin: upstream, https://github.com/monitoring-plugins/monitoring-plugins/pull/1191.patch
+Bug: https://github.com/monitoring-plugins/monitoring-plugins/issues/1015
+
+ at DPATCH@
+---
+diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
+index ceac95d..1873a3c 100755
+--- a/plugins-scripts/check_oracle.sh
++++ b/plugins-scripts/check_oracle.sh
+@@ -137,7 +137,7 @@ case "$cmd" in
+     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
+-- 
+2.0.3
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-monitoring-plugins.git



More information about the Pkg-nagios-changes mailing list