head 1.3; access; symbols pkgsrc-2015Q1:1.2.0.32 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.30 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.28 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.26 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.24 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.22 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.20 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.18 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.16 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.14 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.12 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.10 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.8 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.6 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.4 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.2 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.1.1.1.0.36 pkgsrc-2011Q1-base:1.1.1.1 pkgsrc-2010Q4:1.1.1.1.0.34 pkgsrc-2010Q4-base:1.1.1.1 pkgsrc-2010Q3:1.1.1.1.0.32 pkgsrc-2010Q3-base:1.1.1.1 pkgsrc-2010Q2:1.1.1.1.0.30 pkgsrc-2010Q2-base:1.1.1.1 pkgsrc-2010Q1:1.1.1.1.0.28 pkgsrc-2010Q1-base:1.1.1.1 pkgsrc-2009Q4:1.1.1.1.0.26 pkgsrc-2009Q4-base:1.1.1.1 pkgsrc-2009Q3:1.1.1.1.0.24 pkgsrc-2009Q3-base:1.1.1.1 pkgsrc-2009Q2:1.1.1.1.0.22 pkgsrc-2009Q2-base:1.1.1.1 pkgsrc-2009Q1:1.1.1.1.0.20 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-2008Q4:1.1.1.1.0.18 pkgsrc-2008Q4-base:1.1.1.1 pkgsrc-2008Q3:1.1.1.1.0.16 pkgsrc-2008Q3-base:1.1.1.1 cube-native-xorg:1.1.1.1.0.14 cube-native-xorg-base:1.1.1.1 pkgsrc-2008Q2:1.1.1.1.0.12 pkgsrc-2008Q2-base:1.1.1.1 cwrapper:1.1.1.1.0.10 pkgsrc-2008Q1:1.1.1.1.0.8 pkgsrc-2008Q1-base:1.1.1.1 pkgsrc-2007Q4:1.1.1.1.0.6 pkgsrc-2007Q4-base:1.1.1.1 pkgsrc-2007Q3:1.1.1.1.0.4 pkgsrc-2007Q3-base:1.1.1.1 pkgsrc-2007Q2:1.1.1.1.0.2 pkgsrc-2007Q2-base:1.1.1.1 pkgsrc_base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2015.04.03.18.37.32; author rodent; state dead; branches; next 1.2; commitid NBqi1hIGmMFGUagy; 1.2 date 2011.04.08.22.49.49; author morr; state Exp; branches; next 1.1; 1.1 date 2007.04.13.20.06.21; author bouyer; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2007.04.13.20.06.21; author bouyer; state Exp; branches; next ; desc @@ 1.3 log @Sync with net/nagios-plugins. @ text @$NetBSD: patch-am,v 1.2 2011/04/08 22:49:49 morr Exp $ --- contrib/check_mssql.sh.orig 2010-07-27 20:47:15.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 \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; @ 1.2 log @Add DESTDIR support and LICENSE @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.1 2006/10/16 05:29:40 seb Exp $ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.1 2006/10/16 08:40:45 seb Exp $ d3 1 a3 1 --- contrib/check_mssql.sh.orig 2003-08-05 09:56:13.000000000 +0000 @ 1.1.1.1 log @import nagios-plugin-radius, a package for the nagios radius plugin from nagios-plugins-1.4.3. @ text @@