--- nagios-snmp-plugins-1.1.1.orig/debian/compat
+++ nagios-snmp-plugins-1.1.1/debian/compat
@@ -0,0 +1 @@
+5
--- nagios-snmp-plugins-1.1.1.orig/debian/postrm.in
+++ nagios-snmp-plugins-1.1.1/debian/postrm.in
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+PLUGINS="@PLUGINS@"
+
+if [ "$1" = "purge" ]; then
+	if which ucf >/dev/null 2>&1; then
+		have_ucf="yes"
+	fi
+	for f in $PLUGINS; do
+		rm -f /etc/nagios-plugins/config/${f}.cfg
+		if [ "$have_ucf" = "yes" ]; then
+			ucf --purge /etc/nagios-plugins/config/${f}.cfg
+		fi
+	done
+fi
+
+#DEBHELPER#
+
+exit 0
--- nagios-snmp-plugins-1.1.1.orig/debian/postinst
+++ nagios-snmp-plugins-1.1.1/debian/postinst
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+
+templdir=/usr/share/nagios-snmp-plugins/pluginconfig
+
+if [ "$1" = "configure" ]; then
+	if [ -f /usr/share/nagios-plugins/dpkg/functions ]; then
+		# only working with nagios-plugins-basic (>= 1.4.5-2)
+		. /usr/share/nagios-plugins/dpkg/functions
+		register_cfgs $2
+	else
+		# to get working with etch
+		(
+			cd $templdir
+			for f in *cfg; do
+				ucf $f /etc/nagios-plugins/config/$f
+			done
+		);
+	fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- nagios-snmp-plugins-1.1.1.orig/debian/docs
+++ nagios-snmp-plugins-1.1.1/debian/docs
@@ -0,0 +1 @@
+README
--- nagios-snmp-plugins-1.1.1.orig/debian/rules
+++ nagios-snmp-plugins-1.1.1/debian/rules
@@ -0,0 +1,71 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+COMMANDDEFPATH:=/etc/nagios-plugins/config/
+NP_DIR:=debian/nagios-snmp-plugins
+NP_TEMPLATES:=$(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
+NP_LIBEXEC:=/usr/lib/nagios/plugins
+
+plugin_cfgs:=snmp_cpfw snmp_env snmp_int snmp_load snmp_mem snmp_process \
+	snmp_storage snmp_vrrp snmp_win
+
+build: patch-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+
+	dh_clean
+	-rm -f debian/postrm
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/nagios-snmp-plugins.
+	for PLUGINS in *.pl; \
+	do \
+		install -D -m 0755 $$PLUGINS $(NP_DIR)$(NP_LIBEXEC)/$$PLUGINS || exit 1; \
+		sed -i "s#/usr/local/nagios/libexec#$(NP_LIBEXEC)#" $(NP_DIR)$(NP_LIBEXEC)/$$PLUGINS || exit 1; \
+	done
+	# copying templates them into seperate "template" directories outside of
+	# /usr/share/doc for ucf to use.
+	install -d $(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
+	for c in ${plugin_cfgs}; do \
+		cp debian/pluginconfig/$${c}.cfg ${NP_TEMPLATES}; \
+	done
+	# here the list of config templates are writen to postrm
+	sed -e 's/@PLUGINS@/${plugin_cfgs}/' \
+		< debian/postrm.in \
+		> debian/postrm
+	# copy html documentation over
+	install -d $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
+	cp doc/* $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_perl
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do for now.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- nagios-snmp-plugins-1.1.1.orig/debian/README.Debian
+++ nagios-snmp-plugins-1.1.1/debian/README.Debian
@@ -0,0 +1,260 @@
+nagios-snmp-plugins for Debian
+------------------------------
+
+   If you are using snmp v1 and v2c, you can provide your community as last
+   argument with your check_command. So you can specify different communities
+   for different services. With snmp v3 you need to set $USER9$ like shown in
+   the config snipsets in your resource.cfg or you need to modify your
+   command definitions!
+
+   See http://www.manubulon.com/nagios/index_commands.html#snmplogin
+   and http://www.manubulon.com/nagios/index_info.html#snmplogin
+
+   These snipsets are dumped from nagios-snmp-plugins website.
+   Look at <http://www.manubulon.com/nagios/index_commands.html> and
+   <http://www.manubulon.com/nagios/index_info.html> for more (actual) info!
+
+   Here are commands example to use the scripts with nagios.
+
+   All these commands use $USER<n>$ macros to put snmp login. You
+   have to do this for these examples to work.
+   The $USER<n>$ macro are defined in the resources.cfg file
+
+   If you are using snmp v1 :
+   $USER7$=-C <community>
+
+   If you are using snmp v2c :
+   $USER7$=-C <community> -2
+
+   Examples of snmp v3 login :
+   AuthNoPriv (md5) :
+   $USER8$=-l <login> -x <pass>
+
+   AuthPriv (md5,aes) :
+   $USER8$=-l <login> -x <pass> -X <pass> -L md5,aes
+
+   About regular expressions
+
+   With all these scripts, when you select an interface, a service or process name
+   etc... you use by default regular expresions :
+   Note : you can disable this by using "-r"
+
+   Examples : Don't forget it is perl regular expressions.
+   Regexp 	Will match
+   eth 		eth0, eth1, eth2 but also Fastethernet0/0 ....
+   eth[1-9] 	eth1, eth2, ... eth9 but also eth10, eth11
+   eth[1-2]$ 	eth1, eth2 only (not eth11 for ex).
+   dhcp 	dhcpc, dhpcd
+
+*  check_snmp_cpfw.pl
+
+   define command {
+	command_name check_snmp_cpfw_v3
+	command_line $USER1$/check_snmp_cpfw.pl -H $HOSTADDRESS$ $USER8$
+	$ARG1$
+   }
+
+   define service {
+	name checkpoint_verification
+	check_command check_snmp_cpfw_v3!-swa -p Solsoft_Policy \
+   -c 100000,200000 -f
+   }
+
+*  check_snmp_load.pl
+
+   define command {
+	command_name check_snmp_load_v1
+	command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER7$ -T
+   $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define command {
+	command_name check_snmp_load_v3
+	command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER8$ -T
+   $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define service {
+	name bluecoat_load
+	check_command check_snmp_load_v1!bc!95!99
+   }
+
+   define service {
+	name Linux_load
+	check_command check_snmp_load_v1!netsl!4,3,3!8,5,5
+   }
+
+   define service {
+	name Cisco_load
+	check_command check_snmp_load_v1!cisco!90,80,60!100,100,100
+   }
+
+   define service {
+	name lp_load
+	check_command check_snmp_load_v1!lp!90!99
+   }
+
+*  check_snmp_interface.pl
+
+   define command {
+	command_name check_snmp_int_v1
+	command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $USER7$ -n
+   $ARG1$ $ARG2$
+   }
+
+   define command{
+	command_name check_snmp_int_v3
+	command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $USER8$ -n
+   $ARG1$ $ARG2$
+   }
+
+   define service {
+	name check_int_1_6
+	check_command check_snmp_int_v1!"FastEthernet-[1-6]"
+   }
+
+   define service {
+	name check_int_eth0_bdw
+	check_command check_snmp_int_v3!eth0!-k -w 100,50 -c 0,0
+   }
+
+*  check_snmp_mem.pl
+
+   define command {
+	command_name check_snmp_mem_v1
+	command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ $ARG1$
+   -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define command {
+	command_name check_snmp_mem_v3
+	command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER8$ $ARG1$
+   -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define service {
+	name Linux_memory
+	check_command check_snmp_mem_v1!-N!95,60!99,90
+   }
+
+   define service {
+	name Cisco_mem
+	check_command check_snmp_mem_v1!-I!80!99
+   }
+
+*  check_snmp_process.pl
+
+   define command {
+	command_name check_snmp_process_v1
+	command_line $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ $USER7$ -n
+   $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define service {
+	name proxy_checks
+	check_command check_snmp_process_v1!proxy!21,1999!20,2000!-2
+   }
+
+   define service {
+	name Check_httpd_all
+	check_command check_snmp_process_v1!httpd!5,100!0!-2 -m 20,30 -u 90,99
+   }
+
+   define service {
+	name check_crontab
+	service_description Check Crontab service
+	check_command check_snmp_process!crond!0!0
+   }
+
+*  check_snmp_storage.pl
+
+   define command {
+	command_name check_snmp_storage_v1
+	command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ $USER7$ -m
+   $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define command {
+	command_name check_snmp_storage_v3
+	command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ $USER8$ -m
+   $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+   }
+
+   define service {
+	name Check_LinDisk_home
+	service_description Check /home
+	check_command check_snmp_storage_v3!/home!90!97!-r
+   }
+
+   define service {
+	name Win_check_swap
+	service_description Check Windows swap
+	check_command check_snmp_storage_v3!Virtual!60!90
+   }
+
+   define service {
+	name check_linux_swap
+	service_description Check swap linux
+	check_command check_snmp_storage_v1!Swap!60!90!
+   }
+
+   define service {
+	name check_disk_all
+	service_description Check / /opt /var /config
+	check_command check_snmp_storage_v1!"^/$|opt|config|var"!80!90!
+   }
+
+*  check_snmp_vrrp.pl
+
+   define command {
+	command_name check_snmp_vrrp_v1
+	command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER7$ -T
+   $ARG1$ -s $ARG2$
+   }
+
+   define command {
+	command_name check_snmp_vrrp_v3
+	command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER8$ -T
+   $ARG1$ -s $ARG2$
+   }
+
+   define service {
+	name Linkproof_check_vrrp_master
+	service_description Check vrrp in master state
+	check_command check_snmp_vrrp_v3!lp!master
+   }
+
+   define service {
+	name Linkproof_check_vrrp_backup
+	service_description Check vrrp in backup state
+	check_command check_snmp_vrrp_v3!lp!backup
+   }
+
+   define service {
+	name Nokia_clustering
+	check_command check_snmp_vrrp_v3!ipso!2,98%
+   }
+
+*  check_snmp_win.pl
+
+   define command {
+	command_name check_win
+	command_line $USER1$/check_snmp_win.pl -H $HOSTADDRESS$ $USER7$ -n
+   $ARG2$
+   # comment community service(s) name
+   }
+
+   define service {
+	name check_win_dhcp
+	service_description Check dhcp service
+	check_command check_win!dhcp
+	register 0
+   }
+
+   define service {
+	name check_win_reg_spool
+	service_description Verification acces au registre en spooleur
+	check_command check_win!"au registre",spouleur
+	register 0
+   }
+ -- Jan Wagner <waja@cyconet.org>  Fri, 26 Jan 2007 16:32:47 +0100
--- nagios-snmp-plugins-1.1.1.orig/debian/changelog
+++ nagios-snmp-plugins-1.1.1/debian/changelog
@@ -0,0 +1,53 @@
+nagios-snmp-plugins (1.1.1-5~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+
+ -- Jan Wagner <waja@cyconet.org>  Fri, 01 Aug 2008 14:37:11 +0200
+
+nagios-snmp-plugins (1.1.1-5) unstable; urgency=low
+
+  * implement machine-interpretable copyright file
+
+ -- Jan Wagner <waja@cyconet.org>  Sun, 20 Jul 2008 13:17:39 +0200
+
+nagios-snmp-plugins (1.1.1-4) unstable; urgency=low
+
+  * adjust copyright, it's GPL2 (and not later)
+  * update some scripts to newest available version from website
+  * rename 02_disable_epn.dpatch to 50_disable_epn.dpatch to be the last one
+    (Closes: #484462)
+  * Updating standards version to 3.8.0, no changes needed
+
+ -- Jan Wagner <waja@cyconet.org>  Mon, 07 Jul 2008 22:08:37 +0200
+
+nagios-snmp-plugins (1.1.1-3) unstable; urgency=low
+
+  * change unit to bit/s in interface check
+  * add option for scale of bandwidth to interface check
+  * added Vcs- fields, moved Homepage into source header's field
+  * bump standards version to 3.7.3 (no changes needed)
+  * add 02_disable_epn.dpatch to disable epn, since the plugins don't
+    work with it
+  * bump copyright of packaging to 2008
+
+ -- Jan Wagner <waja@cyconet.org>  Mon, 14 Apr 2008 23:20:52 +0200
+
+nagios-snmp-plugins (1.1.1-2) unstable; urgency=low
+
+  * make use of dpatch infrastructure
+  * include a fix for check_snmp_env.pl from cvs
+
+ -- Jan Wagner <waja@cyconet.org>  Fri,  6 Jul 2007 22:22:02 +0200
+
+nagios-snmp-plugins (1.1.1-1) unstable; urgency=low
+
+  * new upstream
+  * include (new) html docs into package
+
+ -- Jan Wagner <waja@cyconet.org>  Wed, 25 Apr 2007 22:00:50 +0200
+
+nagios-snmp-plugins (1.1-1) unstable; urgency=low
+
+  * Initial release (Closes: #401678).
+
+ -- Jan Wagner <waja@cyconet.org>  Mon, 15 Jan 2007 20:34:19 +0100
--- nagios-snmp-plugins-1.1.1.orig/debian/control
+++ nagios-snmp-plugins-1.1.1/debian/control
@@ -0,0 +1,17 @@
+Source: nagios-snmp-plugins
+Section: net
+Priority: optional
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
+Uploaders: Jan Wagner <waja@cyconet.org>
+Build-Depends: debhelper (>= 5), dpatch
+Homepage: http://www.manubulon.com/nagios/index_snmp.html
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/nagios-snmp-plugins/
+Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-snmp-plugins/
+Standards-Version: 3.8.0
+
+Package: nagios-snmp-plugins
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}, libnet-snmp-perl, perl-base (>= 5.8.4-8), ucf
+Suggests: nagios-plugins-basic (>= 1.4.5-2)
+Description: SNMP Plugins for nagios
+ A set of Nagios plugins to check hosts/devices using snmp protocol
--- nagios-snmp-plugins-1.1.1.orig/debian/copyright
+++ nagios-snmp-plugins-1.1.1/debian/copyright
@@ -0,0 +1,46 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Packaged-By: Jan Wagner <waja@cyconet.org>
+Packaged-Date: Tue,  5 Dec 2006 11:52:19 +0100
+Upstream-Name: Nagios SNMP Plugins
+Upstream-Maintainer: Patrick Proy (nagios at proy.org)
+Upstream-Source: http://www.manubulon.com/nagios
+
+Files: *
+Copyright: (C) 2004-2007 Patrick Proy (nagios at proy.org)
+License: GPL-2
+
+Files: debian/*
+Copyright: (C) 2006, 2008 Jan Wagner <waja@cyconet.org>
+License: GPL-2+
+
+License: GPL-2
+	This program is free software; you can redistribute it and/or modify
+	it under the terms of the GNU General Public License version 2 as
+	published by the Free Software Foundation.
+
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+	GNU General Public License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with this program; if not, write to the Free Software
+	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+License: GPL-2+
+        This program is free software; you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation; either version 2 of the License, or
+        (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+        GNU General Public License for more details.
+
+        You should have received a copy of the GNU General Public License
+        along with this program; if not, write to the Free Software
+        Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL file.
--- nagios-snmp-plugins-1.1.1.orig/debian/watch
+++ nagios-snmp-plugins-1.1.1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.manubulon.com/nagios/nagios-snmp-plugins\.(.*)\.tgz debian uupdate
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_vrrp.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_vrrp.cfg
@@ -0,0 +1,20 @@
+# vrrp check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#vrrp
+
+# 'check_snmp_vrrp_v1' command definition
+define command {
+	command_name check_snmp_vrrp_v1
+	command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ -C $ARG3$ -T $ARG1$ -s $ARG2$
+}
+
+# 'check_snmp_vrrp_v2' command definition
+define command {
+	command_name check_snmp_vrrp_v2
+	command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -T $ARG1$ -s $ARG2$
+}
+
+# 'check_snmp_vrrp_v3' command definition
+define command {
+	command_name check_snmp_vrrp_v3
+	command_line $USER1$/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ -s $ARG2$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_mem.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_mem.cfg
@@ -0,0 +1,20 @@
+# system memory check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#mem
+
+# 'check_snmp_mem_v1' command definition
+define command {
+	command_name check_snmp_mem_v1
+	command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG5$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_mem_v2' command definition
+define command {
+	command_name check_snmp_mem_v2
+	command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG5$ -2 $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_mem_v3' command definition
+define command {
+	command_name check_snmp_mem_v3
+	command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER9$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_win.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_win.cfg
@@ -0,0 +1,8 @@
+# windows check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#windows
+
+# 'check_win' command definition
+define command {
+	command_name check_win
+	command_line $USER1$/check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG3$ -n $ARG2$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_env.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_env.cfg
@@ -0,0 +1,20 @@
+# system environment check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#env
+
+# 'check_snmp_env_v1' command definition
+define command {
+	command_name check_snmp_env_v1
+	command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ -C $ARG3$ -T $ARG1$ $ARG2$
+}
+
+# 'check_snmp_env_v2' command definition
+define command {
+	command_name check_snmp_env_v2
+	command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -T $ARG1$ $ARG2$
+}
+
+# 'check_snmp_env_v3' command definition
+define command {
+	command_name check_snmp_env_v3
+	command_line $USER1$/check_snmp_env.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ $ARG2$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_process.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_process.cfg
@@ -0,0 +1,15 @@
+# system process check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#process
+
+# 'check_snmp_process_v1' command definition
+define command {
+	command_name check_snmp_process_v1
+	command_line $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ -C $ARG5$ -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_process_v2' command definition
+define command {
+	command_name check_snmp_process_v2
+	command_line $USER1$/check_snmp_process.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_cpfw.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_cpfw.cfg
@@ -0,0 +1,8 @@
+# check point firewall template, for more info see:
+# http://www.manubulon.com/nagios/index_commands.html#cpfw
+
+# 'check_snmp_cpfw_v3' command definition
+define command {
+	command_name check_snmp_cpfw_v3
+	command_line $USER1$/check_snmp_cpfw.pl -H $HOSTADDRESS$ $USER9$ $ARG1$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_storage.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_storage.cfg
@@ -0,0 +1,20 @@
+# system storage check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#storage
+
+# 'check_snmp_storage_v1' command definition
+define command {
+	command_name check_snmp_storage_v1
+	command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG5$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_storage_v2' command definition
+define command {
+	command_name check_snmp_storage_v2
+	command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_storage_v3' command definition
+define command {
+	command_name check_snmp_storage_v3
+	command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ $USER9$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_load.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_load.cfg
@@ -0,0 +1,20 @@
+# system load check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#load
+
+# 'check_snmp_load_v1' command definition
+define command {
+	command_name	check_snmp_load_v1
+	command_line	$USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C $ARG5$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_load_v2' command definition
+define command {
+	command_name    check_snmp_load_v2
+	command_line    $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
+
+# 'check_snmp_load_v3' command definition
+define command {
+	command_name	check_snmp_load_v3
+	command_line	$USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/pluginconfig/snmp_int.cfg
+++ nagios-snmp-plugins-1.1.1/debian/pluginconfig/snmp_int.cfg
@@ -0,0 +1,20 @@
+# (network-) interface check template, for more see:
+# http://www.manubulon.com/nagios/index_commands.html#interface
+
+# 'check_snmp_int_v1' command definition
+define command {
+	command_name check_snmp_int_v1
+	command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG3$ -n $ARG1$ -B$ARG4$ $ARG2$
+}
+
+# 'check_snmp_int_v2' command definition
+define command {
+	command_name check_snmp_int_v2
+	command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -n $ARG1$ -B$ARG4$ $ARG2$
+}
+
+# 'check_snmp_int_v3' command definition
+define command {
+	command_name check_snmp_int_v3
+	command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $USER9$ -n $ARG1$ -B$ARG4$ $ARG2$
+}
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/02_check_snmp_int.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/02_check_snmp_int.dpatch
@@ -0,0 +1,375 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 02_check_snmp_int.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Update script to version 1.24
+
+@DPATCH@
+
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_int.pl nagios-snmp-plugins-1.1.1/check_snmp_int.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_int.pl	2007-04-23 11:40:39.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_int.pl	2007-10-12 22:23:22.000000000 +0200
+@@ -1,13 +1,12 @@
+ #!/usr/bin/perl -w
+ ############################## check_snmp_int ##############
+-# Version : 1.4.6
+-# Date : April 23 2007
++my $Version='1.24';
++# Date : Oct 10 2007
+ # Author  : Patrick Proy ( patrick at proy.org )
+ # Help : http://nagios.manubulon.com
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+ # Contrib : J. Jungmann, S. Probst, R. Leroy, M. Berger
+ # TODO : 
+-# Check isdn "dormant" state
+ # Maybe put base directory for performance as an option
+ #################################################################
+ #
+@@ -23,10 +22,8 @@
+ 
+ # Nagios specific
+ 
+-use lib "/usr/local/nagios/libexec";
+-use utils qw(%ERRORS $TIMEOUT);
+-#my $TIMEOUT = 5;
+-#my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
++my $TIMEOUT = 15;
++my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+ 
+ # SNMP Datas
+ 
+@@ -36,6 +33,7 @@
+ my $oper_table = '1.3.6.1.2.1.2.2.1.8.';
+ my $admin_table = '1.3.6.1.2.1.2.2.1.7.';
+ my $speed_table = '1.3.6.1.2.1.2.2.1.5.';
++my $speed_table_64 = '1.3.6.1.2.1.31.1.1.1.15.';
+ my $in_octet_table = '1.3.6.1.2.1.2.2.1.10.';
+ my $in_octet_table_64 = '1.3.6.1.2.1.31.1.1.1.6.';
+ my $in_error_table = '1.3.6.1.2.1.2.2.1.14.';
+@@ -49,7 +47,6 @@
+ 
+ # Globals
+ 
+-my $Version='1.4.6';
+ 
+ # Standard options
+ my $o_host = 		undef; 	# hostname
+@@ -58,6 +55,7 @@
+ my $o_help=		undef; 	# wan't some help ?
+ my $o_admin=		undef;	# admin status instead of oper
+ my $o_inverse=  	undef;	# Critical when up
++my $o_dormant=        	undef;  # Dormant state is OK
+ my $o_verb=		undef;	# verbose mode
+ my $o_version=		undef;	# print version
+ my $o_noreg=		undef;	# Do not use Regexp for name
+@@ -66,16 +64,16 @@
+ # Performance data options 
+ my $o_perf=     	undef;  # Output performance data
+ my $o_perfe=		undef;	# Output discard/error also in perf data
+-my $o_perfs=	undef; # include speed in performance output (-S)
+-my $o_perfp=	undef; # output performance data in % of max speed (-y)
+-my $o_perfr=	undef; # output performance data in bits/s or Bytes/s (-Y)
++my $o_perfs=		undef; # include speed in performance output (-S)
++my $o_perfp=		undef; # output performance data in % of max speed (-y)
++my $o_perfr=		undef; # output performance data in bits/s or Bytes/s (-Y)
+ # Speed/error checks
+ my $o_checkperf=	undef;	# checks in/out/err/disc values
+ my $o_delta=		300;	# delta of time of perfcheck (default 5min)
+ my $o_ext_checkperf=	undef;  # extended perf checks (+error+discard) 
+ my $o_warn_opt=		undef;  # warning options
+ my $o_crit_opt=		undef;  # critical options
+-my $o_kbits=	undef;	# Warn and critical in Kbits instead of KBytes
++my $o_kbits=		undef;	# Warn and critical in Kbits instead of KBytes
+ my @o_warn=		undef;  # warning levels of perfcheck
+ my @o_crit=		undef;  # critical levels of perfcheck
+ my $o_highperf=		undef;	# Use 64 bits counters
+@@ -152,7 +150,7 @@
+ sub p_version { print "check_snmp_int version : $Version\n"; }
+ 
+ sub print_usage {
+-    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>)  [-p <port>] -n <name in desc_oid> [-i] [-a] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]\n";
++    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>)  [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]\n";
+ }
+ 
+ sub isnnum { # Return true if arg is not a number
+@@ -195,6 +193,8 @@
+    Make critical when up
+ -a, --admin
+    Use administrative status instead of operational
++-D, --dormant
++   Dormant state is an OK state
+ -o, --octetlength=INTEGER
+   max-size of the SNMP message, usefull in case of Too Long responses.
+   Be carefull with network filters. Range 484 - 65535, default are
+@@ -214,8 +214,8 @@
+ --label
+    Add label before speed in output : in=, out=, errors-out=, etc...
+ -g, --64bits
+-   Use 64 bits counters instead of the standard counters  
+-   when checking bandwidth & performance data.
++   Use 64 bits counters instead of the standard counters when checking 
++   bandwidth & performance data for interface >= 1Gbps.
+    You must use snmp v2c or v3 to get 64 bits counters.
+ -d, --delta=seconds
+    make an average of <delta> seconds (default 300=5min)
+@@ -284,7 +284,8 @@
+         'u'   	=> \$o_prct,      	'prct'   	=> \$o_prct,
+ 		'o:i'   => \$o_octetlength,    	'octetlength:i' => \$o_octetlength,
+ 		'label'   => \$o_label,    	
+-        'd:i'   => \$o_delta,           'delta:i'     	=> \$o_delta
++        'd:i'   => \$o_delta,           'delta:i'     	=> \$o_delta,
++	'D'   => \$o_dormant,           'dormant'             => \$o_dormant
+     );
+     if (defined ($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}};
+     if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"}};
+@@ -460,6 +461,7 @@
+ my (@oid_perf,@oid_perf_outoct,@oid_perf_inoct,@oid_perf_inerr,@oid_perf_outerr,@oid_perf_indisc,@oid_perf_outdisc)=
+    (undef,undef,undef,undef,undef,undef,undef);
+ my @oid_speed=undef;
++my @oid_speed_high=undef;
+ my $num_int = 0;
+ 
+ # Change to 64 bit counters if option is set : 
+@@ -494,7 +496,8 @@
+      if (defined($o_perf) || defined($o_checkperf)) {
+        $oid_perf_inoct[$num_int]= $in_octet_table . $tindex[$num_int];
+        $oid_perf_outoct[$num_int]= $out_octet_table . $tindex[$num_int];
+-	   $oid_speed[$num_int]=$speed_table . $tindex[$num_int];
++       $oid_speed[$num_int]=$speed_table . $tindex[$num_int];
++       $oid_speed_high[$num_int]=$speed_table_64 . $tindex[$num_int];
+        if (defined($o_ext_checkperf) || defined($o_perfe)) {
+ 	 $oid_perf_indisc[$num_int]= $in_discard_table . $tindex[$num_int];
+ 	 $oid_perf_outdisc[$num_int]= $out_discard_table . $tindex[$num_int];
+@@ -509,25 +512,25 @@
+ # No interface found -> error
+ if ( $num_int == 0 ) { print "ERROR : Unknown interface $o_descr\n" ; exit $ERRORS{"UNKNOWN"};}
+ 
+-my ($result,$resultf)=(undef,undef);
++my $result=undef;
++# Add performance oids if requested 
++if (defined($o_perf)||defined($o_checkperf)) {
++  @oids=(@oids,@oid_perf_outoct,@oid_perf_inoct,@oid_speed);
++  if (defined($o_highperf)) { 
++    @oids=(@oids,@oid_speed_high);
++  }   
++  if (defined ($o_ext_checkperf) || defined($o_perfe)) {
++    @oids=(@oids,@oid_perf_inerr,@oid_perf_outerr,@oid_perf_indisc,@oid_perf_outdisc);
++  }
++}
++
+ # Get the requested oid values
+ $result = $session->get_request(
+    Varbindlist => \@oids
+ );
+-if (!defined($result)) { printf("ERROR: Status table : %s.\n", $session->error); $session->close;
++if (!defined($result)) { printf("ERROR: Status/statistics table : %s.\n", $session->error); $session->close;
+    exit $ERRORS{"UNKNOWN"};
+ }
+-# Get the perf value if -f (performance) option defined or -k (check bandwidth)
+-if (defined($o_perf)||defined($o_checkperf)) {
+-  @oid_perf=(@oid_perf_outoct,@oid_perf_inoct,@oid_perf_inerr,@oid_perf_outerr,@oid_perf_indisc,@oid_perf_outdisc,@oid_speed);
+-  $resultf = $session->get_request(
+-   Varbindlist => \@oid_perf
+-  );
+-  if (!defined($resultf)) { printf("ERROR: Statistics table : %s.\n", $session->error); $session->close;
+-     exit $ERRORS{"UNKNOWN"};
+-  }
+-}
+-
+ 
+ $session->close;
+ 
+@@ -544,6 +547,7 @@
+ my $trigger_low=$timenow - 3*$o_delta;
+ my ($old_value,$old_time)=undef;
+ my $speed_unit=undef;
++my $speed_real=undef; # speed of interface using either standard or highperf mib.
+ 
+ # define the OK value depending on -i option
+ my $ok_val= defined ($o_inverse) ? 2 : 1;
+@@ -570,7 +574,22 @@
+     $n_rows = shift(@ret_array);
+     if ($n_rows != 0) { @file_values = @ret_array };     
+     verb ("File read returns : $return with $n_rows rows");
+-	verb ("Interface speed : $$resultf{$oid_speed[$i]}");
++    # Get the speed in normal or highperf speed counters
++    if ($$result{$oid_speed[$i]} == 4294967295) { # Too high for this counter (cf IF-MIB)
++       if (! defined($o_highperf) && (defined($o_prct) || defined ($o_perfs) || defined ($o_perfp))) {
++          print "Cannot get interface speed with standard MIB, use highperf mib (-g) : UNKNOWN\n";
++	  exit $ERRORS{"UNKNOWN"}
++ 	}
++       if (defined ($$result{$oid_speed_high[$i]}) && $$result{$oid_speed_high[$i]} != 0) {
++	  $speed_real=$$result{$oid_speed_high[$i]} * 1000000;
++       } else {
++          print "Cannot get interface speed using highperf mib : UNKNOWN\n";
++          exit $ERRORS{"UNKNOWN"}
++	}
++    } else {
++      $speed_real=$$result{$oid_speed[$i]};
++    }
++    verb ("Interface speed : $speed_real");
+     #make the checks if the file is OK  
+     if ($return ==0) {
+       my $j=$n_rows-1;
+@@ -583,7 +602,7 @@
+ 		my $speed_metric=undef;
+ 		if (defined($o_prct)) { # in % of speed
+ 		  # Speed is in bits/s, calculated speed is in Bytes/s
+-		  $speed_metric=$$resultf{$oid_speed[$i]}/800;
++		  $speed_metric=$speed_real/800;
+ 		  $speed_unit="%";
+ 		} else {
+ 		  if (defined($o_kbits)) { # metric in bits
+@@ -614,24 +633,24 @@
+ 		# First set the modulus depending on highperf counters or not
+ 		my $overfl_mod = defined ($o_highperf) ? 18446744073709551616 : 4294967296;
+ 	    # Check counter (s)
+-		my $overfl = ($$resultf{$oid_perf_inoct[$i]} >= $file_values[$j][1] ) ? 0 : $overfl_mod;
+-	    $checkperf_out_raw[0] = ( ($overfl + $$resultf{$oid_perf_inoct[$i]} - $file_values[$j][1])/
++		my $overfl = ($$result{$oid_perf_inoct[$i]} >= $file_values[$j][1] ) ? 0 : $overfl_mod;
++	    $checkperf_out_raw[0] = ( ($overfl + $$result{$oid_perf_inoct[$i]} - $file_values[$j][1])/
+ 	      			      ($timenow - $file_values[$j][0] ));
+ 		$checkperf_out[0] = $checkperf_out_raw[0] / $speed_metric;
+ 	    
+-	    $overfl = ($$resultf{$oid_perf_outoct[$i]} >= $file_values[$j][2] ) ? 0 : $overfl_mod;
+-		$checkperf_out_raw[1] = ( ($overfl + $$resultf{$oid_perf_outoct[$i]} - $file_values[$j][2])/
++	    $overfl = ($$result{$oid_perf_outoct[$i]} >= $file_values[$j][2] ) ? 0 : $overfl_mod;
++		$checkperf_out_raw[1] = ( ($overfl + $$result{$oid_perf_outoct[$i]} - $file_values[$j][2])/
+ 				      ($timenow - $file_values[$j][0] ));
+ 	    $checkperf_out[1] = $checkperf_out_raw[1] / $speed_metric;
+ 	    
+ 	    if (defined($o_ext_checkperf)) {
+-	      $checkperf_out[2] = ( ($$resultf{$oid_perf_inerr[$i]} - $file_values[$j][3])/
++	      $checkperf_out[2] = ( ($$result{$oid_perf_inerr[$i]} - $file_values[$j][3])/
+ 				($timenow - $file_values[$j][0] ))*60;
+-	      $checkperf_out[3] = ( ($$resultf{$oid_perf_outerr[$i]} - $file_values[$j][4])/
++	      $checkperf_out[3] = ( ($$result{$oid_perf_outerr[$i]} - $file_values[$j][4])/
+ 				($timenow - $file_values[$j][0] ))*60;
+-	      $checkperf_out[4] = ( ($$resultf{$oid_perf_indisc[$i]} - $file_values[$j][5])/
++	      $checkperf_out[4] = ( ($$result{$oid_perf_indisc[$i]} - $file_values[$j][5])/
+ 				($timenow - $file_values[$j][0] ))*60;
+-	      $checkperf_out[5] = ( ($$resultf{$oid_perf_outdisc[$i]} - $file_values[$j][6])/
++	      $checkperf_out[5] = ( ($$result{$oid_perf_outdisc[$i]} - $file_values[$j][6])/
+ 				($timenow - $file_values[$j][0] ))*60;
+ 	    }
+ 	  }
+@@ -641,13 +660,13 @@
+     } 
+     # Put the new values in the array and write the file
+     $file_values[$n_rows][0]=$timenow;
+-    $file_values[$n_rows][1]=$$resultf{$oid_perf_inoct[$i]};
+-    $file_values[$n_rows][2]=$$resultf{$oid_perf_outoct[$i]};
++    $file_values[$n_rows][1]=$$result{$oid_perf_inoct[$i]};
++    $file_values[$n_rows][2]=$$result{$oid_perf_outoct[$i]};
+     if (defined($o_ext_checkperf)) { # Add other values (error & disc)
+-      $file_values[$n_rows][3]=$$resultf{$oid_perf_inerr[$i]};
+-      $file_values[$n_rows][4]=$$resultf{$oid_perf_outerr[$i]};
+-      $file_values[$n_rows][5]=$$resultf{$oid_perf_indisc[$i]};
+-      $file_values[$n_rows][6]=$$resultf{$oid_perf_outdisc[$i]};
++      $file_values[$n_rows][3]=$$result{$oid_perf_inerr[$i]};
++      $file_values[$n_rows][4]=$$result{$oid_perf_outerr[$i]};
++      $file_values[$n_rows][5]=$$result{$oid_perf_indisc[$i]};
++      $file_values[$n_rows][6]=$$result{$oid_perf_outdisc[$i]};
+     } 
+     $n_rows++;
+     $return=write_file($temp_file_name,$n_rows,$n_items_check,@file_values);
+@@ -703,62 +722,79 @@
+   }
+   # Get rid of special caracters for performance in description
+   $descr[$i] =~ s/'\/\(\)/_/g;
+-  if ( $int_status == $ok_val) {
++  if (( $int_status == $ok_val)||(defined($o_dormant) && $int_status == 5)) {
+     $num_ok++;
+   }
+   if (( $int_status == 1 ) && defined ($o_perf)) {
+     if (defined ($o_perfp)) { # output in % of speed
+ 	  if ($usable_data==1) {
++	     my $warn_factor=1;
++	     if (!defined($o_prct)) { # warn&crit in K|M|G B|bps -> put warn_factor to make %
++		$warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
++		if (!defined($o_kbits)) { $warn_factor*=8;}
++		$warn_factor/=$speed_real; 
++		$warn_factor*=100; # now turn into displayed % : 0,1 = 10%
++	     } 
+ 	    $perf_out .= "'" . $descr[$i] ."_in_prct'=";
+-		$perf_out .= sprintf("%.0f",$checkperf_out_raw[0] * 800 / $$resultf{$oid_speed[$i]}) ."%;";
+-		$perf_out .= ($o_warn[0]!=0) ? $o_warn[0] . ";" : ";";
+-		$perf_out .= ($o_crit[0]!=0) ? $o_crit[0] . ";" : ";"; 
++		$perf_out .= sprintf("%.0f",$checkperf_out_raw[0] * 800 / $speed_real) ."%;";
++		$perf_out .= ($o_warn[0]!=0) ? sprintf("%.0f",$o_warn[0]*$warn_factor) . ";" : ";";
++		$perf_out .= ($o_crit[0]!=0) ? sprintf("%.0f",$o_crit[0]*$warn_factor) . ";" : ";"; 
+ 		$perf_out .= "0;100 ";
+ 	    $perf_out .= "'" . $descr[$i] ."_out_prct'=";
+-		$perf_out .= sprintf("%.0f",$checkperf_out_raw[1] * 800 / $$resultf{$oid_speed[$i]}) ."%;";
+-		$perf_out .= ($o_warn[1]!=0) ? $o_warn[1] . ";" : ";";
+-		$perf_out .= ($o_crit[1]!=0) ? $o_crit[1] . ";" : ";"; 
++		$perf_out .= sprintf("%.0f",$checkperf_out_raw[1] * 800 / $speed_real) ."%;";
++		$perf_out .= ($o_warn[1]!=0) ? sprintf("%.0f",$o_warn[1]*$warn_factor) . ";" : ";";
++		$perf_out .= ($o_crit[1]!=0) ? sprintf("%.0f",$o_crit[1]*$warn_factor) . ";" : ";"; 
+ 		$perf_out .= "0;100 ";
+ 	  }
+ 	} elsif (defined ($o_perfr)) { # output in bites or Bytes /s
+ 	  if ($usable_data==1) {
+   	    if (defined($o_kbits)) { # bps
+ 		  # put warning and critical levels into bps or Bps
+-		  my $warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
++		  my $warn_factor;
++		  if (defined($o_prct)) { # warn&crit in % -> put warn_factor to 1% of speed in bps
++			$warn_factor=$speed_real/100;
++		  } else { # just convert from K|M|G bps
++			$warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
++		  }
+ 	      $perf_out .= "'" . $descr[$i] ."_in_bps'=";
+           $perf_out .= sprintf("%.0f",$checkperf_out_raw[0] * 8) .";";
+ 		  $perf_out .= ($o_warn[0]!=0) ? $o_warn[0]*$warn_factor . ";" : ";";
+ 		  $perf_out .= ($o_crit[0]!=0) ? $o_crit[0]*$warn_factor . ";" : ";";
+-		  $perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";		  
++		  $perf_out .= "0;". $speed_real ." ";		  
+ 	      $perf_out .= "'" . $descr[$i] ."_out_bps'=";
+           $perf_out .= sprintf("%.0f",$checkperf_out_raw[1] * 8) .";";
+ 		  $perf_out .= ($o_warn[1]!=0) ? $o_warn[1]*$warn_factor . ";" : ";";
+ 		  $perf_out .= ($o_crit[1]!=0) ? $o_crit[1]*$warn_factor . ";" : ";";
+-		  $perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";		  		  
++		  $perf_out .= "0;". $speed_real ." ";		  		  
+ 	    } else { # Bps
+-		  my $warn_factor = (defined($o_meg)) ? 1048576 : (defined($o_gig)) ? 1073741824 : 1024;
++                  my $warn_factor; 
++                  if (defined($o_prct)) { # warn&crit in % -> put warn_factor to 1% of speed in Bps
++                        $warn_factor=$speed_real/800;
++                  } else { # just convert from K|M|G bps
++			$warn_factor = (defined($o_meg)) ? 1048576 : (defined($o_gig)) ? 1073741824 : 1024;
++		  }
+ 	      $perf_out .= "'" . $descr[$i] ."_in_Bps'=" . sprintf("%.0f",$checkperf_out_raw[0]) .";";
+ 		  $perf_out .= ($o_warn[0]!=0) ? $o_warn[0]*$warn_factor . ";" : ";";
+ 		  $perf_out .= ($o_crit[0]!=0) ? $o_crit[0]*$warn_factor . ";" : ";";
+-		  $perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";		 		  
++		  $perf_out .= "0;". $speed_real / 8 ." ";		 		  
+ 	      $perf_out .= "'" . $descr[$i] ."_out_Bps'=" . sprintf("%.0f",$checkperf_out_raw[1]) .";" ;
+ 		  $perf_out .= ($o_warn[1]!=0) ? $o_warn[1]*$warn_factor . ";" : ";";
+ 		  $perf_out .= ($o_crit[1]!=0) ? $o_crit[1]*$warn_factor . ";" : ";";
+-		  $perf_out .= "0;". $$resultf{$oid_speed[$i]} ." ";		  
++		  $perf_out .= "0;". $speed_real / 8 ." ";		  
+ 	    }
+ 	  }
+ 	} else { # output in octet counter
+-      $perf_out .= "'" . $descr[$i] ."_in_octet'=". $$resultf{$oid_perf_inoct[$i]} ."c ";  
+-      $perf_out .= "'" . $descr[$i] ."_out_octet'=". $$resultf{$oid_perf_outoct[$i]} ."c";  
++      $perf_out .= "'" . $descr[$i] ."_in_octet'=". $$result{$oid_perf_inoct[$i]} ."c ";  
++      $perf_out .= "'" . $descr[$i] ."_out_octet'=". $$result{$oid_perf_outoct[$i]} ."c ";  
+ 	}
+     if (defined ($o_perfe)) {
+-      $perf_out .= " '" . $descr[$i] ."_in_error'=". $$resultf{$oid_perf_inerr[$i]} ."c ";
+-      $perf_out .= "'" . $descr[$i] ."_in_discard'=". $$resultf{$oid_perf_indisc[$i]} ."c ";
+-      $perf_out .= "'" . $descr[$i] ."_out_error'=". $$resultf{$oid_perf_outerr[$i]} ."c ";
+-      $perf_out .= "'" . $descr[$i] ."_out_discard'=". $$resultf{$oid_perf_outdisc[$i]} ."c";
++      $perf_out .= "'" . $descr[$i] ."_in_error'=". $$result{$oid_perf_inerr[$i]} ."c ";
++      $perf_out .= "'" . $descr[$i] ."_in_discard'=". $$result{$oid_perf_indisc[$i]} ."c ";
++      $perf_out .= "'" . $descr[$i] ."_out_error'=". $$result{$oid_perf_outerr[$i]} ."c ";
++      $perf_out .= "'" . $descr[$i] ."_out_discard'=". $$result{$oid_perf_outdisc[$i]} ."c ";
+     }
+ 	if (defined ($o_perfs)) {
+-	  $perf_out .= " '" . $descr[$i] ."_speed_bps'=".$$resultf{$oid_speed[$i]}; 
++	  $perf_out .= "'" . $descr[$i] ."_speed_bps'=".$speed_real; 
+ 	}
+   } 
+ }
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/01_check_snmp_env.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/01_check_snmp_env.dpatch
@@ -0,0 +1,133 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01_check_snmp_env.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Fix some issues via cvs version
+
+@DPATCH@
+
+--- old/check_snmp_env.pl	2007-07-04 09:46:55.000000000 +0200
++++ new/check_snmp_env.pl	2007-07-06 22:17:06.000000000 +0200
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl -w 
+ ############################## check_snmp_env #################
+-# Version : 1.2
+-# Date : April 19 2007
++# Version : 1.3
++# Date : May 24 2007
+ # Author  : Patrick Proy ( patrick at proy.org)
+ # Help : http://www.manubulon.com/nagios/
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+@@ -145,9 +145,24 @@
+ 
+ my @foundry_status = (3,0,2); # oper status : 1:other, 2: Normal, 3: Failure 
+ 
++# Linux Net-SNMP with LM-SENSORS
++my $linux_temp		= "1.3.6.1.4.1.2021.13.16.2.1"; # temperature table
++my $linux_temp_descr	= "1.3.6.1.4.1.2021.13.16.2.1.2"; # temperature entry description
++my $linux_temp_value	= "1.3.6.1.4.1.2021.13.16.2.1.3"; # temperature entry value (mC)
++my $linux_fan		= "1.3.6.1.4.1.2021.13.16.3.1"; # fan table
++my $linux_fan_descr	= "1.3.6.1.4.1.2021.13.16.3.1.2"; # fan entry description
++my $linux_fan_value	= "1.3.6.1.4.1.2021.13.16.3.1.3"; # fan entry value (RPM)
++my $linux_volt		= "1.3.6.1.4.1.2021.13.16.4.1"; # voltage table
++my $linux_volt_descr	= "1.3.6.1.4.1.2021.13.16.4.1.2"; # voltage entry description
++my $linux_volt_value	= "1.3.6.1.4.1.2021.13.16.4.1.3"; # voltage entry value (mV)
++my $linux_misc		= "1.3.6.1.4.1.2021.13.16.4.1"; # misc table
++my $linux_misc_descr	= "1.3.6.1.4.1.2021.13.16.4.1.2"; # misc entry description
++my $linux_misc_value	= "1.3.6.1.4.1.2021.13.16.4.1.3"; # misc entry value
++
++
+ # Globals
+ 
+-my $Version='1.2';
++my $Version='1.3';
+ 
+ my $o_host = 	undef; 		# hostname
+ my $o_community = undef; 	# community
+@@ -160,7 +175,7 @@
+ my $o_version2= undef;          # use snmp v2c
+ # check type  
+ my $o_check_type= "cisco";	 # default Cisco
+-my @valid_types	=("cisco","nokia","bc","iron","foundry");	
++my @valid_types	=("cisco","nokia","bc","iron","foundry","linux");	
+ my $o_temp=	undef;		# max temp
+ my $o_fan=	undef;		# min fan speed
+ 
+@@ -177,7 +192,7 @@
+ sub p_version { print "check_snmp_env version : $Version\n"; }
+ 
+ sub print_usage {
+-    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] -T (cisco|nokia|bc|iron|foundry) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]\n";
++    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])  [-p <port>] -T (cisco|nokia|bc|iron|foundry|linux) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]\n";
+ }
+ 
+ sub isnnum { # Return true if arg is not a number
+@@ -221,17 +236,18 @@
+ -P, --port=PORT
+    SNMP port (Default 161)
+ -T, --type=cisco|nokia|bc|iron|foundry
+-	Environemental check : 
+-		cisco : voltage,temp,fan,power supply status
+-		        will try to check everything present
+-		nokia : fan and power supply
+-		bc : fans, power supply, voltage, disks
+-		iron : fans, power supply, temp
+-		foundry : power supply, temp
++   Environemental check : 
++	cisco : All Cisco equipements : voltage,temp,fan,power supply
++	        (will try to check everything in the env mib)
++	nokia : Nokia IP platforms : fan and power supply
++	bc : BlueCoat platforms : fans, power supply, voltage, disks
++	iron : IronPort platforms : fans, power supply, temp
++	foundry : Foundry Network platforms : power supply, temp
++	linux : Net-SNMP with LM-SENSORS : temp, fan, volt, misc
+ -F, --fan=<rpm>
+-   Minimum fan rpm value
++   Minimum fan rpm value (only needed for 'iron' & 'linux')
+ -c, --celcius=<celcius>
+-   Maximum temp in degree celcius
++   Maximum temp in degree celcius (only needed for 'iron' & 'linux')
+ -f, --perfparse
+    Perfparse compatible output
+ -t, --timeout=INTEGER
+@@ -428,8 +444,10 @@
+     if (!defined ($cur_status)) { ### Error TODO
+       $volt_global=1;
+     } 
+-    $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ;
+-    $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]};
++    if (defined($$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]})) {
++      $perf_output.=" '".$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}."'=" ;
++      $perf_output.=$$resultat{$ciscoVoltageTableValue."." . $voltindex[$i]};
++    }	
+     if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+       $volt_global= 1;
+       $volt_status{$$resultat{$ciscoVoltageTableDesc .".".$voltindex[$i]}}=$cur_status;
+@@ -448,8 +466,10 @@
+     if (!defined ($cur_status)) { ### Error TODO
+       $temp_global=1;
+     }
+-    $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ;
+-    $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]};
++    if (defined($$resultat{$ciscoTempTableValue."." . $tempindex[$i]})) {
++      $perf_output.=" '".$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}."'=" ;
++      $perf_output.=$$resultat{$ciscoTempTableValue."." . $tempindex[$i]};
++    }
+     if ($Nagios_state[$CiscoEnvMonNagios{$cur_status}] ne "OK") {
+       $temp_global= 1;
+       $temp_status{$$resultat{$ciscoTempTableDesc .".".$tempindex[$i]}}=$cur_status;
+@@ -1003,4 +1023,14 @@
+ 
+ }
+ 
+-exit (3);
++########### Cisco env checks ##############
++if ($o_check_type eq "linux") {
++
++ verb("Checking linux env");
++
++ print "Not implemented yet : UNKNOWN\n";
++ exit $ERRORS{"UNKNOWN"};
++}
++
++print "Unknown check type : UNKNOWN\n";
++exit $ERRORS{"UNKNOWN"};
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/50_disable_epn.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/50_disable_epn.dpatch
@@ -0,0 +1,133 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 50_disable_epn.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: leave marks to disable epn
+
+@DPATCH@
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_boostedge.pl nagios-snmp-plugins-1.1.1/check_snmp_boostedge.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_boostedge.pl	2007-01-16 23:57:14.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_boostedge.pl	2008-05-23 14:09:04.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_boostedge.pl #################
+ # Version : 1.0
+ # Date : Jan 16 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_cpfw.pl nagios-snmp-plugins-1.1.1/check_snmp_cpfw.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_cpfw.pl	2007-04-20 00:03:30.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_cpfw.pl	2008-05-23 14:09:09.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_cpfw ##############
+ # Version : 1.2.1
+ # Date : April 19 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_css_main.pl nagios-snmp-plugins-1.1.1/check_snmp_css_main.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_css_main.pl	2006-10-05 23:40:55.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_css_main.pl	2008-05-23 14:09:25.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_css_main.pl #################
+ # Version : 1.0	
+ # Date : 27 Sept 2006
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_css.pl nagios-snmp-plugins-1.1.1/check_snmp_css.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_css.pl	2007-01-11 17:06:08.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_css.pl	2008-05-23 14:09:18.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_css.pl #################
+ # Version : 1.0.1
+ # Date : 27 Sept 2006
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_env.pl nagios-snmp-plugins-1.1.1/check_snmp_env.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_env.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_env.pl	2008-05-23 14:09:32.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_env #################
+ # Version : 1.3
+ # Date : May 24 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_int.pl nagios-snmp-plugins-1.1.1/check_snmp_int.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_int.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_int.pl	2008-05-23 14:09:39.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ ############################## check_snmp_int ##############
+ my $Version='1.24';
+ # Date : Oct 10 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_linkproof_nhr.pl nagios-snmp-plugins-1.1.1/check_snmp_linkproof_nhr.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_linkproof_nhr.pl	2006-08-26 14:37:12.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_linkproof_nhr.pl	2008-05-23 14:09:46.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_linkproof_nhr #################
+ # Version : 1.0
+ # Date : Aug 24 2006
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_load.pl nagios-snmp-plugins-1.1.1/check_snmp_load.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_load.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_load.pl	2008-05-23 14:09:52.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_load #################
+ my $Version='1.12';
+ # Date : Oct 12 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_mem.pl nagios-snmp-plugins-1.1.1/check_snmp_mem.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_mem.pl	2006-07-09 22:52:37.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_mem.pl	2008-05-23 14:09:58.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_mem ##############
+ # Version : 1.1
+ # Date : Jul 09 2006
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_nsbox.pl nagios-snmp-plugins-1.1.1/check_snmp_nsbox.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_nsbox.pl	2007-01-16 23:55:21.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_nsbox.pl	2008-05-23 14:10:04.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_nsbox #################
+ # Version : 1.0
+ # Date : Jan 16 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_process.pl nagios-snmp-plugins-1.1.1/check_snmp_process.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_process.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_process.pl	2008-05-23 14:10:10.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ ############################## check_snmp_process ##############
+ my $Version='1.10';
+ # Date : Oct 12 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_storage.pl nagios-snmp-plugins-1.1.1/check_snmp_storage.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_storage.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_storage.pl	2008-05-23 14:10:15.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ ############################## check_snmp_storage ##############
+ # Version : 1.3.3
+ # Date :  Jun 1 2007
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_vrrp.pl nagios-snmp-plugins-1.1.1/check_snmp_vrrp.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_vrrp.pl	2006-08-23 23:39:48.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_vrrp.pl	2008-05-23 14:10:21.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w 
++# nagios: -epn
+ ############################## check_snmp_vrrp ##############
+ # Version : 1.3
+ # Date : Aug 23 2006
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_win.pl nagios-snmp-plugins-1.1.1/check_snmp_win.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_win.pl	2008-05-23 14:05:14.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_win.pl	2008-05-23 14:10:26.000000000 +0200
+@@ -1,4 +1,5 @@
+ #!/usr/bin/perl -w
++# nagios: -epn
+ ############################## check_snmp_win ##############
+ my $Version='1.1';
+ # Date : Oct 12 2007
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/00list
+++ nagios-snmp-plugins-1.1.1/debian/patches/00list
@@ -0,0 +1,7 @@
+01_check_snmp_env.dpatch
+02_check_snmp_int.dpatch
+03_check_snmp_load.dpatch
+04_check_snmp_process.dpatch
+05_check_snmp_storage.dpatch
+06_check_snmp_win.dpatch
+50_disable_epn.dpatch
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/06_check_snmp_win.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/06_check_snmp_win.dpatch
@@ -0,0 +1,70 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 06_check_snmp_win.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Update script to version 1.1 
+
+@DPATCH@
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_win.pl nagios-snmp-plugins-1.1.1/check_snmp_win.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_win.pl	2006-11-29 20:59:55.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_win.pl	2007-10-12 22:23:25.000000000 +0200
+@@ -1,10 +1,11 @@
+ #!/usr/bin/perl -w
+ ############################## check_snmp_win ##############
+-# Version : 0.6
+-# Date : Nov 29 2006 
++my $Version='1.1';
++# Date : Oct 12 2007
+ # Author  : Patrick Proy (patrick at proy.org)
+-# Help : http://www.manubulon.com/nagios/
++# Help : http://nagios.manubulon.com/
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
++# Contrib : Tenaku
+ # TODO : 
+ ###############################################################
+ #
+@@ -16,10 +17,10 @@
+ 
+ # Nagios specific
+ 
+-use lib "/usr/local/nagios/libexec";
+-use utils qw(%ERRORS $TIMEOUT);
+-#my $TIMEOUT = 5;
+-#my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
++#use lib "/usr/local/nagios/libexec";
++#use utils qw(%ERRORS $TIMEOUT);
++my $TIMEOUT = 15;
++my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+ 
+ # SNMP Datas for processes (MIB II)
+ my $process_table= '1.3.6.1.2.1.25.4.2.1';
+@@ -44,7 +45,6 @@
+ 
+ # Globals
+ 
+-my $Version='0.6';
+ my $Name='check_snmp_win';
+ 
+ my $o_host = 	undef; 		# hostname 
+@@ -93,7 +93,7 @@
+ 
+ sub help {
+    print "\nSNMP Windows Monitor for Nagios version ",$Version,"\n";
+-   print "GPL licence, (c)2004-2005 Patrick Proy\n\n";
++   print "GPL licence, (c)2004-2007 Patrick Proy\n\n";
+    print_usage();
+    print <<EOT;
+ -v, --verbose
+@@ -344,7 +344,11 @@
+ foreach my $List (@o_descrL) {
+   my $test=0;
+   for (my $i=0; $i< $num_int; $i++) {
+-    if ( $descr[$i] =~ /$List/i  ) { $test++; }
++    if (defined($o_noreg)){
++      if ($descr[$i] eq $List) { $test++;}
++    } else {
++      if ( $descr[$i] =~ /$List/i ) { $test++; }
++    }
+   }
+   if ($test==0) {
+     $output .= ", " if defined($output);
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/03_check_snmp_load.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/03_check_snmp_load.dpatch
@@ -0,0 +1,46 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 03_check_snmp_load.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Update script to version 1.12
+
+@DPATCH@
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_load.pl nagios-snmp-plugins-1.1.1/check_snmp_load.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_load.pl	2007-04-16 19:41:20.000000000 +0200
++++ nagios-snmp-plugins-1.1.1/check_snmp_load.pl	2007-10-12 22:23:23.000000000 +0200
+@@ -1,11 +1,10 @@
+ #!/usr/bin/perl -w 
+ ############################## check_snmp_load #################
+-# Version : 1.3.2
+-# Date : Jan 16 2007
++my $Version='1.12';
++# Date : Oct 12 2007
+ # Author  : Patrick Proy ( patrick at proy.org)
+-# Help : http://www.manubulon.com/nagios/
++# Help : http://nagios.manubulon.com/
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+-# Changelog : HP-UX load added.
+ # Contributors : F. Lacroix and many others !!!
+ #################################################################
+ #
+@@ -18,10 +17,8 @@
+ 
+ # Nagios specific
+ 
+-use lib "/usr/local/nagios/libexec";
+-use utils qw(%ERRORS $TIMEOUT);
+-#my $TIMEOUT = 15;
+-#my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
++my $TIMEOUT = 15;
++my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+ 
+ # SNMP Datas
+ 
+@@ -94,7 +91,6 @@
+ 
+ # Globals
+ 
+-my $Version='1.3.2';
+ 
+ my $o_host = 	undef; 		# hostname
+ my $o_community = undef; 	# community
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/04_check_snmp_process.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/04_check_snmp_process.dpatch
@@ -0,0 +1,210 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 04_check_snmp_process.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Update script to version 1.10
+
+@DPATCH@
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_process.pl nagios-snmp-plugins-1.1.1/check_snmp_process.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_process.pl	2007-03-12 21:36:02.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_process.pl	2007-10-12 22:23:24.000000000 +0200
+@@ -1,45 +1,43 @@
+ #!/usr/bin/perl -w
+ ############################## check_snmp_process ##############
+-# Version : 1.4
+-# Date : March 12 2007
+-# Author  : Patrick Proy (patrick at proy.org)
++my $Version='1.10';
++# Date : Oct 12 2007
++# Author  : Patrick Proy (patrick at proy dot org)
+ # Help : http://nagios.manubulon.com
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+-# Contrib : Makina Corpus
++# Contrib : Makina Corpus, adam At greekattic d0t com
+ # TODO : put $o_delta as an option
+-# Contrib : 
++# 	 If testing on localhost, selects itself....
+ ###############################################################
+ #
+ # help : ./check_snmp_process -h
+ 
++use strict;
++use Net::SNMP;
++use Getopt::Long;
++
+ ############### BASE DIRECTORY FOR TEMP FILE ########
+ my $o_base_dir="/tmp/tmp_Nagios_proc.";
+ my $file_history=200;   # number of data to keep in files.
+ my $delta_of_time_to_make_average=300;  # 5minutes by default
+- 
+-use strict;
+-use Net::SNMP;
+-use Getopt::Long;
+ 
+ # Nagios specific
+ 
+-use lib "/usr/local/nagios/libexec";
+-use utils qw(%ERRORS $TIMEOUT);
+-#my $TIMEOUT = 5;
+-#my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
++my $TIMEOUT = 15;
++my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
+ 
+ # SNMP Datas
+ my $process_table= '1.3.6.1.2.1.25.4.2.1';
+ my $index_table = '1.3.6.1.2.1.25.4.2.1.1';
+ my $run_name_table = '1.3.6.1.2.1.25.4.2.1.2';
+ my $run_path_table = '1.3.6.1.2.1.25.4.2.1.4';
++my $run_param_table = '1.3.6.1.2.1.25.4.2.1.5';
+ my $proc_mem_table = '1.3.6.1.2.1.25.5.1.1.2'; # Kbytes
+ my $proc_cpu_table = '1.3.6.1.2.1.25.5.1.1.1'; # Centi sec of CPU
+ my $proc_run_state = '1.3.6.1.2.1.25.4.2.1.7';
+ 
+ # Globals
+ 
+-my $Version='1.4';
+ 
+ my $o_host = 	undef; 		# hostname 
+ my $o_community =undef; 	# community 
+@@ -57,6 +55,8 @@
+ my $o_path=	undef;		# check path instead of name
+ my $o_inverse=	undef;		# checks max instead of min number of process
+ my $o_get_all=	undef;		# get all tables at once
++my $o_param=	undef;		# Add process parameters for selection 
++my $o_perf=	undef;		# Add performance output
+ my $o_timeout=  5;            	# Default 5s Timeout
+ # SNMP V3 specific
+ my $o_login=	undef;		# snmp v3 login
+@@ -80,7 +80,7 @@
+ sub p_version { print "check_snmp_process version : $Version\n"; }
+ 
+ sub print_usage {
+-    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> ] [-t <timeout>] [-o <octet_length>] [-f ] [-r] [-V] [-g]\n";
++    print "Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> -d<delta> ] [-t <timeout>] [-o <octet_length>] [-f -A -F ] [-r] [-V] [-g]\n";
+ }
+ 
+ sub isnotnum { # Return true if arg is not a number
+@@ -174,6 +174,12 @@
+ -f, --fullpath
+    Use full path name instead of process name 
+    (Windows doesn't provide full path name)
++-A, --param
++   Add parameters to select processes.
++   ex : "named.*-t /var/named/chroot" will only select named process with this parameter 
++-F, --perfout
++   Add performance output
++   outputs : memory_usage, num_process, cpu_usage
+ -w, --warn=MIN[,MAX]
+    Number of process that will cause a warning 
+    -1 for no warning, MAX must be >0. Ex : -w-1,50
+@@ -193,6 +199,8 @@
+    checks cpu usage of all process
+    values are warning and critical values in % of CPU usage
+    if more than one CPU, value can be > 100% : 100%=1 CPU
++-d, --delta=seconds
++   make an average of <delta> seconds for CPU (default 300=5min)   
+ -g, --getall
+   In some cases, it is necessary to get all data at once because
+   process die very frequently.
+@@ -242,6 +250,9 @@
+ 		'2'	=> \$o_version2,	'v2c'		=> \$o_version2,
+ 		'o:i'   => \$o_octetlength,    	'octetlength:i' => \$o_octetlength,
+ 		'g'   	=> \$o_get_all,       	'getall'      	=> \$o_get_all,
++		'A'     => \$o_param,         'param'       => \$o_param,
++		'F'     => \$o_perf,         'perfout'       => \$o_perf,
++        'd:i'   => \$o_delta,           'delta:i'       => \$o_delta,		
+ 		'V'     => \$o_version,         'version'       => \$o_version
+     );
+     if (defined ($o_help)) { help(); exit $ERRORS{"UNKNOWN"}};
+@@ -411,6 +422,19 @@
+    exit $ERRORS{"UNKNOWN"};
+ }
+ 
++my $resultat_param=undef;
++if (defined($o_param)) { # Get parameter table too
++    $resultat_param = (Net::SNMP->VERSION < 4) ?
++        $session->get_table($run_param_table)
++        :$session->get_table(Baseoid => $run_param_table);
++   if (!defined($resultat_param)) {
++      printf("ERROR: Process param table : %s.\n", $session->error);
++      $session->close;
++      exit $ERRORS{"UNKNOWN"};
++   }
++   
++}
++
+ if (defined ($o_get_all)) {
+   $getall_run = (Net::SNMP->VERSION < 4) ?
+ 	$session->get_table($proc_run_state )
+@@ -458,8 +482,14 @@
+ verb("Filter : $o_descr");
+ 
+ foreach my $key ( keys %$resultat) {
+-   verb("OID : $key, Desc : $$resultat{$key}");
+    # test by regexp or exact match
++   # First add param if necessary
++   if (defined($o_param)){
++	my $pid = (split /\./,$key)[-1];
++	$pid = $run_param_table .".".$pid;
++        $$resultat{$key} .= " " . $$resultat_param{$pid};
++   }
++   verb("OID : $key, Desc : $$resultat{$key}");
+    my $test = defined($o_noreg)
+                 ? $$resultat{$key} eq $o_descr
+                 : $$resultat{$key} =~ /$o_descr/;
+@@ -545,6 +575,7 @@
+ }
+ 
+ my $final_status=0;
++my $perf_output;
+ my ($res_memory,$res_cpu)=(0,0);
+ my $memory_print="";
+ my $cpu_print="";
+@@ -571,6 +602,9 @@
+  } else {
+    $memory_print=", Mem : ".sprintf("%.1f",$res_memory)."Mb OK";
+  }
++ if (defined($o_perf)) {
++	$perf_output= "'memory_usage'=".sprintf("%.1f",$res_memory) ."MB;".$o_memL[0].";".$o_memL[1];
++ }
+ }
+ 
+ ######## Checks CPU usage
+@@ -609,6 +643,10 @@
+         if ($file_values[$j][0] > $trigger_low) {
+           # found value = centiseconds / seconds = %cpu
+           $found_value= ($res_cpu-$file_values[$j][1]) / ($timenow - $file_values[$j][0] );
++	  if ($found_value <0) { # in case of program restart
++		$j=0;$found_value=undef; # don't look for more values
++		$n_rows=0; # reset file
++	  }
+         }
+       }
+       $j--;
+@@ -631,6 +669,10 @@
+     } else {
+       $cpu_print.=", Cpu : ".sprintf("%.0f",$found_value)."% OK";
+     }
++	if (defined($o_perf)) {
++		if (!defined($perf_output)) {$perf_output="";} else {$perf_output.=" ";}
++		$perf_output.= "'cpu_usage'=". sprintf("%.0f",$found_value)."%;".$o_cpuL[0].";".$o_cpuL[1];
++	}
+   } else {
+     if ($final_status==0) { $final_status=3 };
+     $cpu_print.=", No data for CPU (".$n_rows." line(s)):UNKNOWN";
+@@ -659,7 +701,14 @@
+    print " (<= ",$o_warnL[1],"):OK";
+ }
+ 
+-print $memory_print,$cpu_print,"\n";
++print $memory_print,$cpu_print;
++
++if (defined($o_perf)) {
++	if (!defined($perf_output)) {$perf_output="";} else {$perf_output.=" ";}
++	$perf_output.= "'num_process'=". $num_int_ok.";".$o_warnL[0].";".$o_critL[0];
++	print " | ",$perf_output;
++}
++print "\n";
+ 
+ if ($final_status==2) { exit $ERRORS{"CRITICAL"};}
+ if ($final_status==1) { exit $ERRORS{"WARNING"};}
--- nagios-snmp-plugins-1.1.1.orig/debian/patches/05_check_snmp_storage.dpatch
+++ nagios-snmp-plugins-1.1.1/debian/patches/05_check_snmp_storage.dpatch
@@ -0,0 +1,225 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 05_check_snmp_storage.dpatch by Jan Wagner <waja@cyconet.org>
+##
+## DP: Update script to version 1.3.3 
+
+@DPATCH@
+
+diff -Nur nagios-snmp-plugins-1.1.1.orig/check_snmp_storage.pl nagios-snmp-plugins-1.1.1/check_snmp_storage.pl
+--- nagios-snmp-plugins-1.1.1.orig/check_snmp_storage.pl	2007-03-12 22:01:36.000000000 +0100
++++ nagios-snmp-plugins-1.1.1/check_snmp_storage.pl	2007-10-12 22:23:24.000000000 +0200
+@@ -1,12 +1,12 @@
+ #!/usr/bin/perl -w
+ ############################## check_snmp_storage ##############
+-# Version : 1.3.2
+-# Date :  March 12 2007
++# Version : 1.3.3
++# Date :  Jun 1 2007
+ # Author  : Patrick Proy ( patrick at proy.org)
+ # Help : http://nagios.manubulon.com
+ # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
+ # TODO : 
+-# Contribs : Dimo Velev, Makina Corpus
++# Contribs : Dimo Velev, Makina Corpus, A. Greiner-Bär
+ #################################################################
+ #
+ # help : ./check_snmp_storage -h
+@@ -57,7 +57,7 @@
+ # Globals
+ 
+ my $Name='check_snmp_storage';
+-my $Version='1.3.2';
++my $Version='1.3.3';
+ 
+ my $o_host = 	undef; 		# hostname 
+ my $o_community = undef; 	# community 
+@@ -80,6 +80,8 @@
+ my $o_perf=	undef;		# Output performance data
+ my $o_short=	undef;	# Short output parameters
+ my @o_shortL=	undef;		# output type,where,cut
++my $o_reserve=	0;              # % reserved blocks (A. Greiner-Bär patch)
++my $o_giga=		undef;	# output and levels in gigabytes instead of megabytes
+ # SNMPv3 specific
+ my $o_login=	undef;		# Login for snmpv3
+ my $o_passwd=	undef;		# Pass for snmpv3
+@@ -95,7 +97,7 @@
+ sub p_version { print "$Name version : $Version\n"; }
+ 
+ sub print_usage {
+-    print "Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r] [-s] [-i] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>]\n";
++    print "Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
+ }
+ 
+ sub round ($$) {
+@@ -122,7 +124,7 @@
+ 
+ sub help {
+    print "\nSNMP Disk Monitor for Nagios version ",$Version,"\n";
+-   print "(c)2004-2006 Patrick Proy\n\n";
++   print "(c)2004-2007 Patrick Proy\n\n";
+    print_usage();
+    print <<EOT;
+ By default, plugin will monitor %used on drives :
+@@ -135,7 +137,7 @@
+    name or IP address of host to check
+ -C, --community=COMMUNITY NAME
+    community name for the host's SNMP agent (implies SNMP v1)
+-2, --v2c
++-2, --v2c
+    Use snmp v2c
+ -l, --login=LOGIN ; -x, --passwd=PASSWD
+    Login and auth password for snmpv3 authentication 
+@@ -179,6 +181,11 @@
+ -c, --critical=INTEGER
+    percent / MB of disk used to generate CRITICAL state
+    you can add the % sign 
++-R, --reserved=INTEGER
++   % reserved blocks for superuser
++   For ext2/3 filesystems, it is 5% by default
++-G, --gigabyte
++   output, warning & critical levels in gigabytes
+ -f, --perfparse
+    Perfparse compatible output
+ -S, --short=<type>[,<where>,<cut>]
+@@ -245,7 +252,9 @@
+ 		'q:s'  	=> \$o_storagetype,	'storagetype:s'=> \$o_storagetype,
+ 	'S:s'   => \$o_short,         	'short:s'       => \$o_short,
+ 	'o:i'   => \$o_octetlength,    	'octetlength:i' => \$o_octetlength,
+-	'f'	=> \$o_perf,		'perfparse'	=> \$o_perf
++	'f'	=> \$o_perf,		'perfparse'	=> \$o_perf,
++	'R:i'	=> \$o_reserve,	        'reserved:i'	=> \$o_reserve,
++	'G'	=> \$o_giga,	        'gigabyte'	=> \$o_giga
+     );
+     if (defined($o_help) ) { help(); exit $ERRORS{"UNKNOWN"}};
+     if (defined($o_version) ) { p_version(); exit $ERRORS{"UNKNOWN"}};
+@@ -271,6 +280,9 @@
+     # Check compulsory attributes
+     if ( ! defined($o_descr) ||  ! defined($o_host) || !defined($o_warn) || 
+ 	!defined($o_crit)) { print_usage(); exit $ERRORS{"UNKNOWN"}};
++    # Get rid of % sign if any
++    $o_warn =~ s/\%//; 
++    $o_crit =~ s/\%//;
+     # Check for positive numbers
+     if (($o_warn < 0) || ($o_crit < 0)) { print " warn and critical > 0 \n";print_usage(); exit $ERRORS{"UNKNOWN"}};
+     # check if warn or crit  in % and MB is tested
+@@ -278,9 +290,6 @@
+ 	print "warning or critical cannot be in % when MB are tested\n";
+ 	print_usage(); exit $ERRORS{"UNKNOWN"};
+     }
+-    # Get rid of % sign
+-    $o_warn =~ s/\%//; 
+-    $o_crit =~ s/\%//;
+     # Check warning and critical values
+     if ( ( $o_type eq 'pu' ) || ( $o_type eq 'bu' )) {
+ 	if ($o_warn >= $o_crit) { print " warn < crit if type=",$o_type,"\n";print_usage(); exit $ERRORS{"UNKNOWN"}};
+@@ -306,6 +315,10 @@
+     if (defined ($o_octetlength) && (isnnum($o_octetlength) || $o_octetlength > 65535 || $o_octetlength < 484 )) {
+ 		print "octet lenght must be < 65535 and > 484\n";print_usage(); exit $ERRORS{"UNKNOWN"};
+     }	
++    #### reserved blocks checks (A. Greiner-Bär patch).
++    if (defined ($o_reserve) && (isnnum($o_reserve) || $o_reserve > 99 || $o_reserve < 0 )) {
++		print "reserved blocks must be < 100 and >= 0\n";print_usage(); exit $ERRORS{"UNKNOWN"};
++    }
+ }
+ 
+ ########## MAIN #######
+@@ -521,21 +534,35 @@
+ my $crit_state=0;
+ my ($p_warn,$p_crit);
+ my $output=undef;
++my $output_metric_val = 1024**2;
++my $output_metric = "M";
++# Set the metric 
++if (defined($o_giga)) {
++	$output_metric_val *= 1024;
++	$output_metric='G';
++}
++
+ for ($i=0;$i<$num_int;$i++) {
+   verb("Descr : $descr[$i]");
+   verb("Size :  $$result{$size_table . $tindex[$i]}");
+   verb("Used : $$result{$used_table . $tindex[$i]}");
+   verb("Alloc : $$result{$alloc_units . $tindex[$i]}");
+-  my $to = $$result{$size_table . $tindex[$i]} * $$result{$alloc_units . $tindex[$i]} / 1024**2;
++  if (!defined($$result{$size_table . $tindex[$i]}) || 
++	!defined($$result{$used_table . $tindex[$i]}) || 
++	!defined ($$result{$alloc_units . $tindex[$i]})) {
++     print "Data not fully defined for storage ",$descr[$i]," : UNKNOWN\n";
++     exit $ERRORS{"UNKNOWN"};
++  }
++  my $to = $$result{$size_table . $tindex[$i]} * ( ( 100 - $o_reserve ) / 100 ) * $$result{$alloc_units . $tindex[$i]} / $output_metric_val;
+   my $pu=undef;
+   if ( $$result{$used_table . $tindex[$i]} != 0 ) {
+-    $pu = $$result{$used_table . $tindex[$i]}*100 / $$result{$size_table . $tindex[$i]};
++	$pu = $$result{$used_table . $tindex[$i]}* 100 /  ( $$result{$size_table . $tindex[$i]} * ( 100 - $o_reserve ) / 100 );
+   }else {
+     $pu=0;
+   } 
+-  my $bu = $$result{$used_table . $tindex[$i]} *  $$result{$alloc_units . $tindex[$i]} / 1024**2;
++  my $bu = $$result{$used_table . $tindex[$i]} *  $$result{$alloc_units . $tindex[$i]} / $output_metric_val;
+   my $pl = 100 - $pu;
+-  my $bl = ($$result{$size_table . $tindex[$i]}- $$result{$used_table . $tindex[$i]}) * $$result{$alloc_units . $tindex[$i]} / 1024**2;
++  my $bl = ( ( $$result{$size_table . $tindex[$i]} * ( ( 100 - $o_reserve ) / 100 ) - ( $$result{$used_table . $tindex[$i]} ) ) * $$result{$alloc_units . $tindex[$i]} / $output_metric_val );
+   # add a ' ' if some data exists in $perf_out
+   $perf_out .= " " if (defined ($perf_out)) ;
+   ##### Ouputs and checks
+@@ -554,7 +581,7 @@
+ 	   || (($pu >= $o_warn) && ($locstate=$warn_state=1));
+ 	if (defined($o_shortL[2])) {}
+ 	if (!defined($o_shortL[0]) || ($locstate==1)) { # print full output if warn or critical state
+-	  $output.=sprintf ("%s: %.0f%%used(%.0fMB/%.0fMB) ",$descr[$i],$pu,$bu,$to);
++	  $output.=sprintf ("%s: %.0f%%used(%.0f%sB/%.0f%sB) ",$descr[$i],$pu,$bu,$output_metric,$to,$output_metric);
+     } elsif ($o_shortL[0] == 1) {
+ 	  $output.=sprintf ("%s: %.0f%% ",$descr[$i],$pu);
+ 	} 
+@@ -566,9 +593,9 @@
+     ( ($bu >= $o_crit) && ($locstate=$crit_state=1) ) 
+ 	  || ( ($bu >= $o_warn) && ($locstate=$warn_state=1) );
+ 	if (!defined($o_shortL[0]) || ($locstate==1)) { # print full output if warn or critical state
+-      $output.=sprintf("%s: %.0fMBused/%.0fMB (%.0f%%) ",$descr[$i],$bu,$to,$pu);
++      $output.=sprintf("%s: %.0f%sBused/%.0f%sB (%.0f%%) ",$descr[$i],$bu,$output_metric,$to,$output_metric,$pu);
+     } elsif ($o_shortL[0] == 1) {
+-	  $output.=sprintf("%s: %.0fMB ",$descr[$i],$bu);
++	  $output.=sprintf("%s: %.0f%sB ",$descr[$i],$bu,$output_metric);
+     } 
+  }
+  
+@@ -578,9 +605,9 @@
+     ( ($bl <= $o_crit) && ($locstate=$crit_state=1) ) 
+ 	  || ( ($bl <= $o_warn) && ($locstate=$warn_state=1) );
+ 	if (!defined($o_shortL[0]) || ($locstate==1)) { # print full output if warn or critical state
+-      $output.=sprintf ("%s: %.0fMBleft/%.0fMB (%.0f%%) ",$descr[$i],$bl,$to,$pl);
++      $output.=sprintf ("%s: %.0f%sBleft/%.0f%sB (%.0f%%) ",$descr[$i],$bl,$output_metric,$to,$output_metric,$pl);
+     } elsif ($o_shortL[0] == 1) {
+-	  $output.=sprintf ("%s: %.0fMB ",$descr[$i],$bl);
++	  $output.=sprintf ("%s: %.0f%sB ",$descr[$i],$bl,$output_metric);
+     } 
+  }
+   
+@@ -590,13 +617,13 @@
+     ( ($pl <= $o_crit) && ($locstate=$crit_state=1) ) 
+ 	  || ( ($pl <= $o_warn) && ($locstate=$warn_state=1) );
+ 	if (!defined($o_shortL[0]) || ($locstate==1)) { # print full output if warn or critical state
+-      $output.=sprintf ("%s: %.0f%%left(%.0fMB/%.0fMB) ",$descr[$i],$pl,$bl,$to);
++      $output.=sprintf ("%s: %.0f%%left(%.0f%sB/%.0f%sB) ",$descr[$i],$pl,$bl,$output_metric,$to,$output_metric);
+     } elsif ($o_shortL[0] == 1) {
+ 	  $output.=sprintf ("%s: %.0f%% ",$descr[$i],$pl);
+     } 
+   }
+   # Performance output (in MB)
+-  $perf_out .= "'".$Pdescr. "'=" . round($bu,0) . "MB;" . round($p_warn,0) 
++  $perf_out .= "'".$Pdescr. "'=" . round($bu,0) . $output_metric ."B;" . round($p_warn,0) 
+ 	       . ";" . round($p_crit,0) . ";0;" . round($to,0);
+ }
+ 
+@@ -606,8 +633,8 @@
+ my $comp_unit=undef;
+ ($o_type eq "pu") && ($comp_oper ="<") && ($comp_unit ="%");
+ ($o_type eq "pl") && ($comp_oper =">") && ($comp_unit ="%");
+-($o_type eq "bu") && ($comp_oper ="<") && ($comp_unit ="MB");
+-($o_type eq 'bl') && ($comp_oper =">") && ($comp_unit ="MB");
++($o_type eq "bu") && ($comp_oper ="<") && ($comp_unit = $output_metric."B");
++($o_type eq 'bl') && ($comp_oper =">") && ($comp_unit =$output_metric."B");
+ 
+ if (!defined ($output)) { $output="All selected storages "; }
+ 
