diff options
author | seb <seb@pkgsrc.org> | 2006-10-16 08:40:45 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2006-10-16 08:40:45 +0000 |
commit | e76f7a83ff79f445f14fbf8a36f4ec007cb53b6f (patch) | |
tree | 0e99aacb8689973736c1646613c67ec644487477 /net | |
parent | 8f38b3955be0993db7512ad896c50fcf881ed652 (diff) | |
download | pkgsrc-e76f7a83ff79f445f14fbf8a36f4ec007cb53b6f.tar.gz |
Fixed "test ==".
Diffstat (limited to 'net')
-rw-r--r-- | net/nagios-plugin-ldap/distinfo | 4 | ||||
-rw-r--r-- | net/nagios-plugin-ldap/patches/patch-al | 92 | ||||
-rw-r--r-- | net/nagios-plugin-ldap/patches/patch-am | 56 | ||||
-rw-r--r-- | net/nagios-plugin-mysql/distinfo | 4 | ||||
-rw-r--r-- | net/nagios-plugin-mysql/patches/patch-al | 92 | ||||
-rw-r--r-- | net/nagios-plugin-mysql/patches/patch-am | 56 | ||||
-rw-r--r-- | net/nagios-plugin-pgsql/distinfo | 4 | ||||
-rw-r--r-- | net/nagios-plugin-pgsql/patches/patch-al | 92 | ||||
-rw-r--r-- | net/nagios-plugin-pgsql/patches/patch-am | 56 | ||||
-rw-r--r-- | net/nagios-plugin-snmp/distinfo | 4 | ||||
-rw-r--r-- | net/nagios-plugin-snmp/patches/patch-al | 92 | ||||
-rw-r--r-- | net/nagios-plugin-snmp/patches/patch-am | 56 |
12 files changed, 604 insertions, 4 deletions
diff --git a/net/nagios-plugin-ldap/distinfo b/net/nagios-plugin-ldap/distinfo index 3a7a7551e19..956afc0ad1d 100644 --- a/net/nagios-plugin-ldap/distinfo +++ b/net/nagios-plugin-ldap/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2006/08/17 14:21:39 taca Exp $ +$NetBSD: distinfo,v 1.3 2006/10/16 08:40:45 seb Exp $ SHA1 (nagios-plugins-1.4.3.tar.gz) = c26fc2f31d7579c3a8174dcd1965046c4b1c8d37 RMD160 (nagios-plugins-1.4.3.tar.gz) = bc1d4f8cddd481775c514758a462fe533e01e846 Size (nagios-plugins-1.4.3.tar.gz) = 1257775 bytes SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82 +SHA1 (patch-al) = cfeef69928795681f17e1faa1639fb3e57a31c32 +SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436 diff --git a/net/nagios-plugin-ldap/patches/patch-al b/net/nagios-plugin-ldap/patches/patch-al new file mode 100644 index 00000000000..b3f944d580c --- /dev/null +++ b/net/nagios-plugin-ldap/patches/patch-al @@ -0,0 +1,92 @@ +$NetBSD: patch-al,v 1.1 2006/10/16 08:40:45 seb Exp $ + +--- contrib/check_axis.sh.orig 2003-05-26 10:09:23.000000000 +0000 ++++ contrib/check_axis.sh +@@ -5,7 +5,7 @@ port=$2 + usr=$3 + pass=$4 + +-if [ ! "$#" == "4" ]; then ++if [ ! "$#" = "4" ]; then + echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" + fi + +@@ -27,7 +27,7 @@ fi + + lines=`cat $tempfile | grep -i $port` + status=`echo $lines | awk '{ print $3 }'` +-if [ "$status" == "Printing" ]; then ++if [ "$status" = "Printing" ]; then + bytes=`echo $lines | awk '{ print $4 }'`; + comments=`echo $lines | tr -d "
" | awk '{ print $5 " " $6 }'`; + else +@@ -40,48 +40,48 @@ if [ "$comma" -eq "1" ]; then + fi + + +-if [ "$status" == "Available" ]; then +- if [ "$comments" == "Paper out" ]; then ++if [ "$status" = "Available" ]; then ++ if [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == " " ]; then ++ elif [ "$comments" = " " ]; then + exit="0" && stdio="OK - Printer is available but returns no comments."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - No error."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - Ready."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - Printer fault."; + else + exit="3" && stdio="Comments: $comments"; + fi +-elif [ "$status" == "Printing" ]; then +- if [ "$comments" == "Printer busy" ]; then ++elif [ "$status" = "Printing" ]; then ++ if [ "$comments" = "Printer busy" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Paper out" ]; then ++ elif [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Busy " ]; then ++ elif [ "$comments" = "Busy " ]; then + exit="0" && stdio="OK - PRINTING. Busy. Bytes printed: $bytes."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - PRINTING. Printer fault. Bytes printed: $bytes."; + else + exit="3" && stdio="Comments: $comments."; diff --git a/net/nagios-plugin-ldap/patches/patch-am b/net/nagios-plugin-ldap/patches/patch-am new file mode 100644 index 00000000000..495de47227e --- /dev/null +++ b/net/nagios-plugin-ldap/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; diff --git a/net/nagios-plugin-mysql/distinfo b/net/nagios-plugin-mysql/distinfo index 3a7a7551e19..956afc0ad1d 100644 --- a/net/nagios-plugin-mysql/distinfo +++ b/net/nagios-plugin-mysql/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2006/08/17 14:21:39 taca Exp $ +$NetBSD: distinfo,v 1.3 2006/10/16 08:40:45 seb Exp $ SHA1 (nagios-plugins-1.4.3.tar.gz) = c26fc2f31d7579c3a8174dcd1965046c4b1c8d37 RMD160 (nagios-plugins-1.4.3.tar.gz) = bc1d4f8cddd481775c514758a462fe533e01e846 Size (nagios-plugins-1.4.3.tar.gz) = 1257775 bytes SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82 +SHA1 (patch-al) = cfeef69928795681f17e1faa1639fb3e57a31c32 +SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436 diff --git a/net/nagios-plugin-mysql/patches/patch-al b/net/nagios-plugin-mysql/patches/patch-al new file mode 100644 index 00000000000..b3f944d580c --- /dev/null +++ b/net/nagios-plugin-mysql/patches/patch-al @@ -0,0 +1,92 @@ +$NetBSD: patch-al,v 1.1 2006/10/16 08:40:45 seb Exp $ + +--- contrib/check_axis.sh.orig 2003-05-26 10:09:23.000000000 +0000 ++++ contrib/check_axis.sh +@@ -5,7 +5,7 @@ port=$2 + usr=$3 + pass=$4 + +-if [ ! "$#" == "4" ]; then ++if [ ! "$#" = "4" ]; then + echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" + fi + +@@ -27,7 +27,7 @@ fi + + lines=`cat $tempfile | grep -i $port` + status=`echo $lines | awk '{ print $3 }'` +-if [ "$status" == "Printing" ]; then ++if [ "$status" = "Printing" ]; then + bytes=`echo $lines | awk '{ print $4 }'`; + comments=`echo $lines | tr -d "
" | awk '{ print $5 " " $6 }'`; + else +@@ -40,48 +40,48 @@ if [ "$comma" -eq "1" ]; then + fi + + +-if [ "$status" == "Available" ]; then +- if [ "$comments" == "Paper out" ]; then ++if [ "$status" = "Available" ]; then ++ if [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == " " ]; then ++ elif [ "$comments" = " " ]; then + exit="0" && stdio="OK - Printer is available but returns no comments."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - No error."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - Ready."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - Printer fault."; + else + exit="3" && stdio="Comments: $comments"; + fi +-elif [ "$status" == "Printing" ]; then +- if [ "$comments" == "Printer busy" ]; then ++elif [ "$status" = "Printing" ]; then ++ if [ "$comments" = "Printer busy" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Paper out" ]; then ++ elif [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Busy " ]; then ++ elif [ "$comments" = "Busy " ]; then + exit="0" && stdio="OK - PRINTING. Busy. Bytes printed: $bytes."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - PRINTING. Printer fault. Bytes printed: $bytes."; + else + exit="3" && stdio="Comments: $comments."; 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; diff --git a/net/nagios-plugin-pgsql/distinfo b/net/nagios-plugin-pgsql/distinfo index 3a7a7551e19..956afc0ad1d 100644 --- a/net/nagios-plugin-pgsql/distinfo +++ b/net/nagios-plugin-pgsql/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2006/08/17 14:21:39 taca Exp $ +$NetBSD: distinfo,v 1.3 2006/10/16 08:40:45 seb Exp $ SHA1 (nagios-plugins-1.4.3.tar.gz) = c26fc2f31d7579c3a8174dcd1965046c4b1c8d37 RMD160 (nagios-plugins-1.4.3.tar.gz) = bc1d4f8cddd481775c514758a462fe533e01e846 Size (nagios-plugins-1.4.3.tar.gz) = 1257775 bytes SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82 +SHA1 (patch-al) = cfeef69928795681f17e1faa1639fb3e57a31c32 +SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436 diff --git a/net/nagios-plugin-pgsql/patches/patch-al b/net/nagios-plugin-pgsql/patches/patch-al new file mode 100644 index 00000000000..b3f944d580c --- /dev/null +++ b/net/nagios-plugin-pgsql/patches/patch-al @@ -0,0 +1,92 @@ +$NetBSD: patch-al,v 1.1 2006/10/16 08:40:45 seb Exp $ + +--- contrib/check_axis.sh.orig 2003-05-26 10:09:23.000000000 +0000 ++++ contrib/check_axis.sh +@@ -5,7 +5,7 @@ port=$2 + usr=$3 + pass=$4 + +-if [ ! "$#" == "4" ]; then ++if [ ! "$#" = "4" ]; then + echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" + fi + +@@ -27,7 +27,7 @@ fi + + lines=`cat $tempfile | grep -i $port` + status=`echo $lines | awk '{ print $3 }'` +-if [ "$status" == "Printing" ]; then ++if [ "$status" = "Printing" ]; then + bytes=`echo $lines | awk '{ print $4 }'`; + comments=`echo $lines | tr -d "
" | awk '{ print $5 " " $6 }'`; + else +@@ -40,48 +40,48 @@ if [ "$comma" -eq "1" ]; then + fi + + +-if [ "$status" == "Available" ]; then +- if [ "$comments" == "Paper out" ]; then ++if [ "$status" = "Available" ]; then ++ if [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == " " ]; then ++ elif [ "$comments" = " " ]; then + exit="0" && stdio="OK - Printer is available but returns no comments."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - No error."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - Ready."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - Printer fault."; + else + exit="3" && stdio="Comments: $comments"; + fi +-elif [ "$status" == "Printing" ]; then +- if [ "$comments" == "Printer busy" ]; then ++elif [ "$status" = "Printing" ]; then ++ if [ "$comments" = "Printer busy" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Paper out" ]; then ++ elif [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Busy " ]; then ++ elif [ "$comments" = "Busy " ]; then + exit="0" && stdio="OK - PRINTING. Busy. Bytes printed: $bytes."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - PRINTING. Printer fault. Bytes printed: $bytes."; + else + exit="3" && stdio="Comments: $comments."; diff --git a/net/nagios-plugin-pgsql/patches/patch-am b/net/nagios-plugin-pgsql/patches/patch-am new file mode 100644 index 00000000000..495de47227e --- /dev/null +++ b/net/nagios-plugin-pgsql/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; diff --git a/net/nagios-plugin-snmp/distinfo b/net/nagios-plugin-snmp/distinfo index a7f6a9b7243..3ad697bbe6f 100644 --- a/net/nagios-plugin-snmp/distinfo +++ b/net/nagios-plugin-snmp/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2006/08/17 14:21:39 taca Exp $ +$NetBSD: distinfo,v 1.3 2006/10/16 08:40:45 seb Exp $ SHA1 (nagios-plugins-1.4.3.tar.gz) = c26fc2f31d7579c3a8174dcd1965046c4b1c8d37 RMD160 (nagios-plugins-1.4.3.tar.gz) = bc1d4f8cddd481775c514758a462fe533e01e846 @@ -6,3 +6,5 @@ Size (nagios-plugins-1.4.3.tar.gz) = 1257775 bytes SHA1 (patch-ad) = 75bb44093f1fe0d18668cb9aec787d760fe16ad4 SHA1 (patch-ae) = 42a2767b290e4a10c93f170e85138e8c639906dc SHA1 (patch-ak) = c3d9f6ea9a971c45ec4159f800c2a975a3013c82 +SHA1 (patch-al) = cfeef69928795681f17e1faa1639fb3e57a31c32 +SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436 diff --git a/net/nagios-plugin-snmp/patches/patch-al b/net/nagios-plugin-snmp/patches/patch-al new file mode 100644 index 00000000000..b3f944d580c --- /dev/null +++ b/net/nagios-plugin-snmp/patches/patch-al @@ -0,0 +1,92 @@ +$NetBSD: patch-al,v 1.1 2006/10/16 08:40:45 seb Exp $ + +--- contrib/check_axis.sh.orig 2003-05-26 10:09:23.000000000 +0000 ++++ contrib/check_axis.sh +@@ -5,7 +5,7 @@ port=$2 + usr=$3 + pass=$4 + +-if [ ! "$#" == "4" ]; then ++if [ ! "$#" = "4" ]; then + echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" + fi + +@@ -27,7 +27,7 @@ fi + + lines=`cat $tempfile | grep -i $port` + status=`echo $lines | awk '{ print $3 }'` +-if [ "$status" == "Printing" ]; then ++if [ "$status" = "Printing" ]; then + bytes=`echo $lines | awk '{ print $4 }'`; + comments=`echo $lines | tr -d "
" | awk '{ print $5 " " $6 }'`; + else +@@ -40,48 +40,48 @@ if [ "$comma" -eq "1" ]; then + fi + + +-if [ "$status" == "Available" ]; then +- if [ "$comments" == "Paper out" ]; then ++if [ "$status" = "Available" ]; then ++ if [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == " " ]; then ++ elif [ "$comments" = " " ]; then + exit="0" && stdio="OK - Printer is available but returns no comments."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - No error."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - Ready."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - Out of paper."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - Printer fault."; + else + exit="3" && stdio="Comments: $comments"; + fi +-elif [ "$status" == "Printing" ]; then +- if [ "$comments" == "Printer busy" ]; then ++elif [ "$status" = "Printing" ]; then ++ if [ "$comments" = "Printer busy" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "No error" ]; then ++ elif [ "$comments" = "No error" ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Paper out" ]; then ++ elif [ "$comments" = "Paper out" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper."; +- elif [ "$comments" == "Out of" ]; then ++ elif [ "$comments" = "Out of" ]; then + exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes."; +- elif [ "$comments" == "Busy Out" ]; then ++ elif [ "$comments" = "Busy Out" ]; then + exit="1" && stdio="WARNING - Busy, out of paper."; +- elif [ "$comments" == "Ready " ]; then ++ elif [ "$comments" = "Ready " ]; then + exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes."; +- elif [ "$comments" == "Printer off-line" ]; then ++ elif [ "$comments" = "Printer off-line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Busy " ]; then ++ elif [ "$comments" = "Busy " ]; then + exit="0" && stdio="OK - PRINTING. Busy. Bytes printed: $bytes."; +- elif [ "$comments" == "Off line" ]; then ++ elif [ "$comments" = "Off line" ]; then + exit="1" && stdio="WARNING - PRINTING. Printer is off line."; +- elif [ "$comments" == "Printer fault" ]; then ++ elif [ "$comments" = "Printer fault" ]; then + exit="2" && stdio="CRITICAL - PRINTING. Printer fault. Bytes printed: $bytes."; + else + exit="3" && stdio="Comments: $comments."; diff --git a/net/nagios-plugin-snmp/patches/patch-am b/net/nagios-plugin-snmp/patches/patch-am new file mode 100644 index 00000000000..495de47227e --- /dev/null +++ b/net/nagios-plugin-snmp/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; |