summaryrefslogtreecommitdiff
path: root/net/nagios-plugin-mysql/patches/patch-am
diff options
context:
space:
mode:
Diffstat (limited to 'net/nagios-plugin-mysql/patches/patch-am')
-rw-r--r--net/nagios-plugin-mysql/patches/patch-am56
1 files changed, 56 insertions, 0 deletions
diff --git a/net/nagios-plugin-mysql/patches/patch-am b/net/nagios-plugin-mysql/patches/patch-am
new file mode 100644
index 00000000000..495de47227e
--- /dev/null
+++ b/net/nagios-plugin-mysql/patches/patch-am
@@ -0,0 +1,56 @@
+$NetBSD: patch-am,v 1.1 2006/10/16 08:40:45 seb Exp $
+
+--- contrib/check_mssql.sh.orig 2003-08-05 09:56:13.000000000 +0000
++++ contrib/check_mssql.sh
+@@ -35,10 +35,10 @@ pswd=$3
+ srv=$4
+
+
+-if [ ! "$#" == "4" ]; then
++if [ ! "$#" = "4" ]; then
+ echo -e "\nYou did not supply enough arguments. \nUsage: $0 <host> <username> <password> <version> \n \n$0 checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.\n\nYou need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2003. \n\nExample:\n $0 dbserver sa f00bar 2000\n" && exit "3"
+
+-elif [ $tsqlcmd == "" ]; then
++elif [ $tsqlcmd = "" ]; then
+ echo -e "tsql not found! Please verify you have a working version of tsql (included in the FreeTDS version 6.0+) and enter the full path in the script." && exit "3"
+
+ fi
+@@ -50,9 +50,9 @@ exit="3"
+
+ tmpfile=`$mktempcmd /tmp/$hostname.XXXXXX`
+
+-if [ $srv == "7" ]; then
++if [ $srv = "7" ]; then
+ spid=7
+-elif [ $srv == "2000" ]; then
++elif [ $srv = "2000" ]; then
+ spid=50
+ else
+ echo -e "$srv is not a supported MS SQL Server version!" && exit "3"
+@@ -69,7 +69,7 @@ $tsqlcmd -S $hostname -U $usr -P $pswd <
+
+ $grepcmd -q "Login failed for user" $errorfile
+
+-if [ "$?" == "0" ]; then
++if [ "$?" = "0" ]; then
+ $rmcmd -f $tmpfile $resultfile $errorfile;
+ echo CRITICAL - Could not make connection to SQL server. Login failed.;
+ exit 2;
+@@ -77,7 +77,7 @@ fi
+
+ $grepcmd -q "There was a problem connecting to the server" $errorfile
+
+-if [ "$?" == "0" ]; then
++if [ "$?" = "0" ]; then
+ $rmcmd -f $tmpfile $resultfile $errorfile;
+ echo CRITICAL - Could not make connection to SQL server. Incorrect server name or SQL service not running.;
+ exit 2;
+@@ -85,7 +85,7 @@ fi
+
+ resultfileln=`$catcmd $resultfile | $wccmd -l | $sedcmd 's/ //g'`
+
+-if [ "$resultfileln" == "2" ]; then
++if [ "$resultfileln" = "2" ]; then
+ $rmcmd -f $tmpfile $resultfile $errorfile;
+ echo CRITICAL - Could not make connection to SQL server. No data received from host.;
+ exit 2;