diff --git a/debian/patches/check_ajp/return_critical_on_failed_connection b/debian/patches/check_ajp/return_critical_on_failed_connection deleted file mode 100644 index 80f18f4..0000000 --- a/debian/patches/check_ajp/return_critical_on_failed_connection +++ /dev/null @@ -1,79 +0,0 @@ ---- a/check_ajp/check_ajp -+++ b/check_ajp/check_ajp -@@ -7,6 +7,7 @@ - # - # check_ajp - nagios plugin for jboss monitoring - # Copyright (C) 2010 Michel Rode -+# Copyright (C) 2013 Bernd Zeimetz - # - # 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 -@@ -30,6 +31,8 @@ use strict; - use Getopt::Long; - use Socket; - use Time::HiRes 'time'; -+use IO::Socket; -+ - - my $app = ''; - my $port = '8009'; -@@ -37,9 +40,14 @@ my $warntime = '1.5'; - my $crittime = '3'; - my $timeout = '10'; - --my ($iaddr, $paddr, $proto, $sock, $time1, $time2); -+my ($sock, $time1, $time2); - my $pong = 'null'; - -+sub conndie{ -+ my $msg = shift; -+ print "CRITICAL : $msg\n"; -+ exit 2; -+} - sub xdie{ - my $msg = shift; - printf STDERR "Usage: check_ajp --app ip.of.the.app [--port 8009 --warn 1 --crit 2 --timeout 5]\n\n"; -@@ -49,6 +57,10 @@ sub xdie{ - - GetOptions("app=s" => \$app, "port=s" => \$port, "warn=f" => \$warntime, "crit=f" => \$crittime, "timeout=f" => \$timeout); - -+if ($app eq '') { -+ xdie('--app not given') -+} -+ - my $ping = pack 'C5' # Format template. - , 0x12, 0x34 # Magic number for server->container packets. - , 0x00, 0x01 # 2 byte int length of payload. -@@ -61,24 +73,23 @@ my $expected = pack 'C5' # Format tem - , 0x09 # Type of packet. 9 = CPong reply. - ; - --$iaddr = inet_aton($app) || xdie("No host given !"); --$paddr = sockaddr_in($port, $iaddr) || xdie("Wrong port !"); --$proto = getprotobyname 'tcp'; -- - $time1 = time(); - - eval { - local $SIG{ALRM} = sub { die "alarm\n" }; - alarm($timeout); -- socket $sock, PF_INET, SOCK_STREAM, $proto || xdie("socket !"); -- connect $sock, $paddr || xdie("connect !"); -- syswrite $sock, $ping || xdie("syswrite !"); -- sysread $sock, $pong, 5 || xdie("sysread !"); -+ $sock = IO::Socket::INET->new(Proto => "tcp", -+ PeerAddr => $app, -+ PeerPort => $port) || conndie($@); -+ $sock->autoflush(1); -+ print $sock $ping; -+ $sock->recv($pong,5); -+ close $sock; - alarm(0); - }; - - if ($@) { -- die unless $@ eq "alarm\n"; -+ conndie($@) unless $@ eq "alarm\n"; - $time2 = (time() - $time1); - printf "CRITICAL - AJP - Timeout after %1.0fs\n",$time2; - exit 2; diff --git a/debian/patches/check_backuppc/use_nagios_plugins b/debian/patches/check_backuppc/use_nagios_plugins deleted file mode 100644 index 9154573..0000000 --- a/debian/patches/check_backuppc/use_nagios_plugins +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_backuppc/src/check_backuppc -+++ b/check_backuppc/src/check_backuppc -@@ -32,7 +32,7 @@ no utf8; - - # Nagios - use lib "NAGIOS_LIB"; --use utils qw(%ERRORS $TIMEOUT); -+use Nagios::Plugin qw(%ERRORS); - use POSIX qw(strftime difftime); - use Getopt::Long; - Getopt::Long::Configure('bundling'); diff --git a/debian/patches/check_clamav/clamav_locations b/debian/patches/check_clamav/clamav_locations deleted file mode 100644 index c857987..0000000 --- a/debian/patches/check_clamav/clamav_locations +++ /dev/null @@ -1,73 +0,0 @@ ---- a/check_clamav/check_clamav -+++ b/check_clamav/check_clamav -@@ -16,18 +16,18 @@ - # - ################################################################################ - # This script is used to compare the version and signature level of the --# currently running clamd daemon with the latest available versions listed in -+# currently running clamscan daemon with the latest available versions listed in - # the TXT record for current.cvd.clamav.net. - # - # In order to use this script, you might need to make the following adjustments: - # - Set the "use lib" path correctly (where utils.pm is located.) --# - Set the path to your clamd binary in $clamd_cmd. -+# - Set the path to your clamscan binary in $clamscan_cmd. - # - # This plugin requires the Net::DNS Perl module. - ################################################################################ - - # Plugin directory / home of utils.pm. --use lib "/usr/local/libexec/nagios"; -+use lib "/usr/lib/nagios/plugins"; - use utils qw(%ERRORS &print_revision &support &usage); - use Getopt::Long qw(:config no_ignore_case bundling); - use File::Basename; -@@ -35,8 +35,8 @@ use Net::DNS; - - use strict; - --# Path to installed clamd binary. --my $clamd_cmd = "/usr/local/sbin/clamd"; -+# Path to installed clamscan binary. -+my $clamscan_cmd = "/usr/bin/clamscan"; - - # Leave the rest of this alone: - my $prog_name = basename $0; -@@ -153,28 +153,28 @@ if ($vers_val != 0) { - } - - # Make sure the binary exists. --if (-x $clamd_cmd) { -- &print_debug("Found clamd at $clamd_cmd"); -+if (-x $clamscan_cmd) { -+ &print_debug("Found clamscan at $clamscan_cmd"); - } else { -- &print_debug("Can't execute clamd at $clamd_cmd"); -- die("FATAL: Unable to execute $clamd_cmd"); -+ &print_debug("Can't execute clamscan at $clamscan_cmd"); -+ die("FATAL: Unable to execute $clamscan_cmd"); - } - - &print_debug("Threshhold values: warning=$warn_val, critical=$crit_val"); - - # Should return something like: ClamAV 0.87.1/1205/Wed Dec 7 07:00:48 2005 --chomp(my $clamd_ver = `$clamd_cmd -V`); -+chomp(my $clamscan_ver = `$clamscan_cmd -V`); - - # Should return something like: 0.87.1:34:1206:1134072033:1 - chomp(my $dnstxt_ver = &lookup_current()); - --# Parse what we get from clamd -V and our DNS query --my @clamdresults = split(/\//,$clamd_ver); -+# Parse what we get from clamscan -V and our DNS query -+my @clamscanresults = split(/\//,$clamscan_ver); - my @txtresults = split(/:/,$dnstxt_ver); - - # Get the currently running ClamAV sig level and cvd date out of this --my $local_latest_daily = $clamdresults[1]; --my $local_latest_date = $clamdresults[2]; -+my $local_latest_daily = $clamscanresults[1]; -+my $local_latest_date = $clamscanresults[2]; - - &print_debug("Local daily.cvd dated $local_latest_date"); - &print_debug("Local daily.cvd version = $local_latest_daily"); diff --git a/debian/patches/check_cups/epn b/debian/patches/check_cups/epn deleted file mode 100644 index cd836f4..0000000 --- a/debian/patches/check_cups/epn +++ /dev/null @@ -1,8 +0,0 @@ ---- a/check_cups/check_cups -+++ b/check_cups/check_cups -@@ -1,4 +1,5 @@ - #!/usr/bin/perl -+# nagios: -epn - - =head1 NAME - diff --git a/debian/patches/check_email_delivery/epn b/debian/patches/check_email_delivery/epn deleted file mode 100644 index 02d5424..0000000 --- a/debian/patches/check_email_delivery/epn +++ /dev/null @@ -1,45 +0,0 @@ ---- a/check_email_delivery/src/check_email_delivery -+++ b/check_email_delivery/src/check_email_delivery -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -+# nagios: -epn -+ - use strict; - my $VERSION = '0.7.1'; - my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; ---- a/check_email_delivery/src/check_imap_quota -+++ b/check_email_delivery/src/check_imap_quota -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -+# nagios: -epn -+ - use strict; - my $VERSION = '0.2'; - my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; ---- a/check_email_delivery/src/check_imap_receive -+++ b/check_email_delivery/src/check_imap_receive -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -+# nagios: -epn -+ - use strict; - my $VERSION = '0.7.5'; - my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; ---- a/check_email_delivery/src/check_smtp_send -+++ b/check_email_delivery/src/check_smtp_send -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -+# nagios: -epn -+ - use strict; - use POSIX qw(strftime); - my $VERSION = '0.7.3'; ---- a/check_email_delivery/src/imap_ssl_cert -+++ b/check_email_delivery/src/imap_ssl_cert -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -+# nagios: -epn -+ - use strict; - my $VERSION = '0.1'; - my $COPYRIGHT = 'Copyright (C) 2005-2011 Jonathan Buhacoff '; diff --git a/debian/patches/check_email_delivery/paths b/debian/patches/check_email_delivery/paths deleted file mode 100644 index e4c8fc6..0000000 --- a/debian/patches/check_email_delivery/paths +++ /dev/null @@ -1,27 +0,0 @@ -Author: Tom Jampen -Description: - Patches check_email_delivery and check_email_delivery_epn to use debian - specific paths. - ---- a/check_email_delivery/src/check_email_delivery -+++ b/check_email_delivery/src/check_email_delivery -@@ -63,7 +63,7 @@ my $default_warn = 15; - my $default_wait = 5; - my $default_timeout = 60; - my $time_hires = ""; --my $libexec = "/usr/local/nagios/libexec"; -+my $libexec = "/usr/lib/nagios/plugins"; - my $ok; - $ok = Getopt::Long::GetOptions( - "V|version"=>\$show_version, ---- a/check_email_delivery/src/check_email_delivery_epn -+++ b/check_email_delivery/src/check_email_delivery_epn -@@ -61,7 +61,7 @@ my $default_warn = 15; - my $default_wait = 5; - my $default_timeout = 60; - my $time_hires = ""; --my $libexec = "/usr/local/nagios/libexec"; -+my $libexec = "/usr/lib/nagios/plugins"; - my $ok; - $ok = Getopt::Long::GetOptions( - "V|version"=>\$show_version, diff --git a/debian/patches/check_haproxy/epn b/debian/patches/check_haproxy/epn deleted file mode 100644 index 1514373..0000000 --- a/debian/patches/check_haproxy/epn +++ /dev/null @@ -1,8 +0,0 @@ ---- a/check_haproxy/check_haproxy -+++ b/check_haproxy/check_haproxy -@@ -1,4 +1,5 @@ - #!/usr/bin/perl -w -+# nagios: -epn - # - # Copyright (c) 2010 Stéphane Urbanovski - # diff --git a/debian/patches/check_httpd_status/epn b/debian/patches/check_httpd_status/epn deleted file mode 100644 index 07a015c..0000000 --- a/debian/patches/check_httpd_status/epn +++ /dev/null @@ -1,9 +0,0 @@ ---- a/check_httpd_status/check_httpd_status -+++ b/check_httpd_status/check_httpd_status -@@ -1,4 +1,6 @@ - #!/usr/bin/perl -w -+# nagios: -epn -+# - ####################### check_apachestatus_auto.pl ####################### - # Version : 1.3 - # Date : 06 Aug 2010 diff --git a/debian/patches/check_libs/config_location b/debian/patches/check_libs/config_location deleted file mode 100644 index ee0181d..0000000 --- a/debian/patches/check_libs/config_location +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_libs/nagios-check-libs -+++ b/check_libs/nagios-check-libs -@@ -71,7 +71,7 @@ if ($params->{'version'}) { - }; - - if (! defined $params->{'config'}) { -- $params->{'config'} = '/etc/nagios-plugins/check-libs.conf'; -+ $params->{'config'} = '/etc/nagios/check-libs.conf'; - } elsif (! -e $params->{'config'}) { - dief("Config file $params->{'config'} does not exist.\n"); - } diff --git a/debian/patches/check_libs/config_path b/debian/patches/check_libs/config_path deleted file mode 100644 index 330d637..0000000 --- a/debian/patches/check_libs/config_path +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_libs/nagios-check-libs -+++ b/check_libs/nagios-check-libs -@@ -71,7 +71,7 @@ if ($params->{'version'}) { - }; - - if (! defined $params->{'config'}) { -- $params->{'config'} = '/etc/nagios/check-libs.conf'; -+ $params->{'config'} = '/etc/nagios-plugins/check-libs.conf'; - } elsif (! -e $params->{'config'}) { - dief("Config file $params->{'config'} does not exist.\n"); - } diff --git a/debian/patches/check_lm_sensors/interpreter b/debian/patches/check_lm_sensors/interpreter deleted file mode 100644 index e46ed48..0000000 --- a/debian/patches/check_lm_sensors/interpreter +++ /dev/null @@ -1,8 +0,0 @@ ---- a/check_lm_sensors/src/check_lm_sensors -+++ b/check_lm_sensors/src/check_lm_sensors -@@ -1,4 +1,4 @@ --#!perl -+#!/usr/bin/perl - - # check_lm_sensors is a Nagios plugin to monitor the values of on board sensors and hard - # disk temperatures on Linux systems diff --git a/debian/patches/check_lm_sensors/manpage_whatis_fix b/debian/patches/check_lm_sensors/manpage_whatis_fix deleted file mode 100644 index 53290de..0000000 --- a/debian/patches/check_lm_sensors/manpage_whatis_fix +++ /dev/null @@ -1,12 +0,0 @@ ---- a/check_lm_sensors/src/check_lm_sensors.pod -+++ b/check_lm_sensors/src/check_lm_sensors.pod -@@ -2,8 +2,7 @@ - - =head1 NAME - --C is a Nagios plugin to monitor the values of on --board sensors and hard disk temperatures on Linux systems -+C - Nagios plugin to monitor hardware sensors and disk temperatures - - =head1 DESCRIPTION - diff --git a/debian/patches/check_lm_sensors/spelling_errors b/debian/patches/check_lm_sensors/spelling_errors deleted file mode 100644 index b684280..0000000 --- a/debian/patches/check_lm_sensors/spelling_errors +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_lm_sensors/src/check_lm_sensors.pod -+++ b/check_lm_sensors/src/check_lm_sensors.pod -@@ -49,7 +49,7 @@ verbosity. - =head1 EXIT STATUS - - 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 --in case of an unkown problem -+in case of an unknown problem - - =head1 DEPENDENCIES - diff --git a/debian/patches/check_nfsmounts/nfs_write_location b/debian/patches/check_nfsmounts/nfs_write_location deleted file mode 100644 index d353587..0000000 --- a/debian/patches/check_nfsmounts/nfs_write_location +++ /dev/null @@ -1,20 +0,0 @@ ---- a/check_nfsmounts/check_nfsmounts -+++ b/check_nfsmounts/check_nfsmounts -@@ -23,6 +23,7 @@ - - use Nagios::Plugin qw(%ERRORS); - use Time::HiRes qw{time alarm}; -+use Sys::Hostname; - use Getopt::Long; - use strict; - -@@ -107,7 +108,8 @@ foreach $dir (@dirs) { - if($pid==0) { - chdir $dir or &bad_mount($dir,$!); - if($writemode and exists($mountmodes{$dir}->{"rw"})) { -- open X,"> $dir/.nfscheck" or exit $?; -+ my $check_filename="$dir/.nfscheck_" . hostname; -+ open X,"> $check_filename" or exit $?; - print X $ENV{HOSTNAME}."\n".localtime()."\n"; # XXX Full disk may fail.. - close X or exit $?; - } diff --git a/debian/patches/check_nfsmounts/perl_module b/debian/patches/check_nfsmounts/perl_module deleted file mode 100644 index 8cb326d..0000000 --- a/debian/patches/check_nfsmounts/perl_module +++ /dev/null @@ -1,19 +0,0 @@ ---- a/check_nfsmounts/check_nfsmounts -+++ b/check_nfsmounts/check_nfsmounts -@@ -21,14 +21,14 @@ - # along with this program. If not, see . - # - --use utils qw{$TIMEOUT %ERRORS}; -+use Nagios::Plugin qw(%ERRORS); - use Time::HiRes qw{time alarm}; - use Getopt::Long; - use strict; - - my $version="1.0"; - --my $nfs_timeout=$TIMEOUT; -+my $nfs_timeout=15; - my $nfs_warn=-1; - my $writemode=0; - my $help=0; diff --git a/debian/patches/check_printer/debian_bts b/debian/patches/check_printer/debian_bts deleted file mode 100644 index ebaafb9..0000000 --- a/debian/patches/check_printer/debian_bts +++ /dev/null @@ -1,35 +0,0 @@ ---- a/check_printer/check_printer -+++ b/check_printer/check_printer -@@ -35,10 +35,6 @@ use warnings; - - use Nagios::Plugin qw(%ERRORS); - --'$Revision$' =~ m/Revision: (\d+)/; --my $revision = $1; --'$HeadURL$' =~ m/HeadURL: ([\w\:\/\-\.\_]+) /; --my $src_url = $1; - my $usage = " - Usage: $0 host_addr community warn% crit% - -@@ -52,7 +48,6 @@ my $debug = 0; - if ($ARGV[4]){ - use Data::Dumper; - $debug = 1; -- print "check_printer Revision $revision\n$src_url\n\n"; - } - die $usage unless ($#ARGV >= 3); - my $base_oid = ".1.3.6.1.2.1.43.11.1.1"; -@@ -235,10 +230,9 @@ while (my($key, $value) = each(%status)) - if ($debug){ - print Dumper(\%status); - print "\n\n############ ATTENTION ############\n"; -- print "You have debug enabled. If asked to enable debug by the developer,\n"; -- print "please send all of the output, including your command line to\n"; -- print "ecrist\@secure-computing.net with the subject line 'check_printer DEBUG' along\n"; -- print "with a description of the problem you're experiencing.\n###################################\n"; -+ print "You have debug enabled. If asked to enable debug by the Debian Maintainer,\n"; -+ print "please send all of the output to the Debian Bug Tracking System, either by \n"; -+ print "replying to an existing bug or by opening a new bug.\n"; - } - if ($is_crit){ - print "$err_str CRITICAL. See http://$ARGV[0] | $perf_str"; diff --git a/debian/patches/check_printer/use_data_dumper_if_needed b/debian/patches/check_printer/use_data_dumper_if_needed deleted file mode 100644 index 374d10f..0000000 --- a/debian/patches/check_printer/use_data_dumper_if_needed +++ /dev/null @@ -1,18 +0,0 @@ ---- a/check_printer/check_printer -+++ b/check_printer/check_printer -@@ -41,7 +41,6 @@ if ($OS =~ m/^\wBSD/){ - } - - use utils qw(%ERRORS); --use Data::Dumper; - - '$Revision$' =~ m/Revision: (\d+)/; - my $revision = $1; -@@ -58,6 +57,7 @@ found for toner and drum. - ## set to 1 if you want debug output for development - my $debug = 0; - if ($ARGV[4]){ -+ use Data::Dumper; - $debug = 1; - print "check_printer Revision $revision\n$src_url\n\n"; - } diff --git a/debian/patches/check_printer/use_nagios_plugin b/debian/patches/check_printer/use_nagios_plugin deleted file mode 100644 index f12bfee..0000000 --- a/debian/patches/check_printer/use_nagios_plugin +++ /dev/null @@ -1,18 +0,0 @@ ---- a/check_printer/check_printer -+++ b/check_printer/check_printer -@@ -33,14 +33,7 @@ - use strict; - use warnings; - --my $OS = `uname`; --if ($OS =~ m/^\wBSD/){ -- use lib "/usr/local/libexec/nagios"; --} elsif ($OS =~ m/Linux/){ -- use lib "/usr/local/nagios/libexec"; --} -- --use utils qw(%ERRORS); -+use Nagios::Plugin qw(%ERRORS); - - '$Revision$' =~ m/Revision: (\d+)/; - my $revision = $1; diff --git a/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli b/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli deleted file mode 100644 index f06c746..0000000 --- a/debian/patches/check_raid/prefer_cciss_vol_status_over_hpacucli +++ /dev/null @@ -1,15 +0,0 @@ ---- a/check_raid/check_raid -+++ b/check_raid/check_raid -@@ -2728,8 +2728,10 @@ sub check { - package hpacucli; - use base 'plugin'; - --# register --push(@utils::plugins, __PACKAGE__); -+# register if cciss_vol_status is not available -+if (! utils::which('cciss_vol_status')) { -+ push(@utils::plugins, __PACKAGE__); -+} - - sub program_names { - __PACKAGE__; diff --git a/debian/patches/check_rbl/disable_solid.net b/debian/patches/check_rbl/disable_solid.net deleted file mode 100644 index c12e2c2..0000000 --- a/debian/patches/check_rbl/disable_solid.net +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_rbl/src/check_rbl.ini -+++ b/check_rbl/src/check_rbl.ini -@@ -36,7 +36,7 @@ - server=blacklist.sci.kun.nl - server=bl.technovision.dk - server=dnsbl.kempt.net --server=dnsbl.solid.net -+;server=dnsbl.solid.net ; domain offline - server=dul.ru - server=forbidden.icm.edu.pl - server=hil.habeas.com diff --git a/debian/patches/check_rbl/interpreter b/debian/patches/check_rbl/interpreter deleted file mode 100644 index 984165b..0000000 --- a/debian/patches/check_rbl/interpreter +++ /dev/null @@ -1,8 +0,0 @@ ---- a/check_rbl/src/check_rbl -+++ b/check_rbl/src/check_rbl -@@ -1,4 +1,4 @@ --#!perl -+#!/usr/bin/perl - - package main; - diff --git a/debian/patches/check_rbl/pod_encoding_fix b/debian/patches/check_rbl/pod_encoding_fix deleted file mode 100644 index a367312..0000000 --- a/debian/patches/check_rbl/pod_encoding_fix +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_rbl/src/check_rbl.pod -+++ b/check_rbl/src/check_rbl.pod -@@ -6,6 +6,8 @@ - - =pod - -+=encoding utf8 -+ - =head1 NAME - - C - a Nagios plugin to check if an SMTP server is blacklisted diff --git a/debian/patches/check_rbl/spelling_errors b/debian/patches/check_rbl/spelling_errors deleted file mode 100644 index 5213e96..0000000 --- a/debian/patches/check_rbl/spelling_errors +++ /dev/null @@ -1,11 +0,0 @@ ---- a/check_rbl/src/check_rbl.pod -+++ b/check_rbl/src/check_rbl.pod -@@ -58,7 +58,7 @@ the querying mechanism. - =head1 EXIT STATUS - - 0 if OK, 1 in case of a warning, 2 in case of a critical status and 3 --in case of an unkown problem -+in case of an unknown problem - - =head1 DEPENDENCIES - diff --git a/debian/patches/check_snmp_time/epn b/debian/patches/check_snmp_time/epn deleted file mode 100644 index f78de4c..0000000 --- a/debian/patches/check_snmp_time/epn +++ /dev/null @@ -1,8 +0,0 @@ ---- a/check_snmp_time/check_snmp_time -+++ b/check_snmp_time/check_snmp_time -@@ -1,4 +1,5 @@ - #!/usr/bin/perl -w -+# nagios: -epn - ############################## check_snmp_time.pl ################# - my $Version='1.1'; - # Date : Dec 08 2010 diff --git a/debian/patches/check_webinject/epn b/debian/patches/check_webinject/epn deleted file mode 100644 index 203e5fd..0000000 --- a/debian/patches/check_webinject/epn +++ /dev/null @@ -1,9 +0,0 @@ ---- a/check_webinject/check_webinject -+++ b/check_webinject/check_webinject -@@ -1,5 +1,5 @@ - #!/usr/bin/perl --# nagios: +epn -+# nagios: -epn - - package Webinject; - diff --git a/debian/patches/dsa/check_packages-inifile b/debian/patches/dsa/check_packages-inifile deleted file mode 100644 index 056b70a..0000000 --- a/debian/patches/dsa/check_packages-inifile +++ /dev/null @@ -1,13 +0,0 @@ ---- a/dsa/checks/dsa-check-packages -+++ b/dsa/checks/dsa-check-packages -@@ -37,8 +37,8 @@ use strict; - use warnings; - use English; - --my $IGNORE = "/etc/nagios/obsolete-packages-ignore"; --my $IGNORED = "/etc/nagios/obsolete-packages-ignore.d"; -+my $IGNORE = "/etc/nagios-plugins/obsolete-packages-ignore"; -+my $IGNORED = "/etc/nagios-plugins/obsolete-packages-ignore.d"; - - my %CODE = ( - 'OK' => 0, diff --git a/debian/patches/dsa/check_packages_location b/debian/patches/dsa/check_packages_location deleted file mode 100644 index eb71d75..0000000 --- a/debian/patches/dsa/check_packages_location +++ /dev/null @@ -1,11 +0,0 @@ ---- a/dsa/sbin/dsa-update-apt-status -+++ b/dsa/sbin/dsa-update-apt-status -@@ -78,7 +78,7 @@ fi - tmp=`tempfile` - trap "rm -f '$tmp'" exit - #/usr/share/dsa/apt-status-check --noupdate --timeout=600 > "$tmp" --/usr/lib/nagios/plugins/dsa-check-packages > "$tmp" -+/usr/lib/nagios/plugins/check_packages > "$tmp" - result="$?" - case "$result" in - 0) diff --git a/debian/patches/dsa/epn b/debian/patches/dsa/epn deleted file mode 100644 index 7f31e58..0000000 --- a/debian/patches/dsa/epn +++ /dev/null @@ -1,8 +0,0 @@ ---- a/dsa/checks/dsa-check-packages -+++ b/dsa/checks/dsa-check-packages -@@ -1,4 +1,5 @@ - #!/usr/bin/perl -+# nagios: -epn - - # dsa-check-packages - diff --git a/debian/patches/dsa/security_updates_critical b/debian/patches/dsa/security_updates_critical deleted file mode 100644 index 1236d5e..0000000 --- a/debian/patches/dsa/security_updates_critical +++ /dev/null @@ -1,73 +0,0 @@ ---- a/dsa/checks/dsa-check-packages -+++ b/dsa/checks/dsa-check-packages -@@ -94,6 +94,7 @@ sub get_packages { - chomp(@lines); - - my $pkgname = undef; -+ my $candidate_found = 0; - while (defined($line = shift @lines)) { - if ($line =~ /^([^ ]*):$/) { - # when we have multi-arch capable fu, we require that -@@ -132,8 +133,19 @@ sub get_packages { - } elsif ($line =~ /^ +Installed: (.*)$/) { - # etch dpkg -l does not print epochs, so use this info, it's better - $installed->{$pkgname}{'installed'} = $1; -+ # initialize security-update -+ $installed->{$pkgname}{'security-update'} = 0; - } elsif ($line =~ /^ +Candidate: (.*)$/) { - $installed->{$pkgname}{'candidate'} = $1; -+ } elsif ($line =~ / ([^ ]+) [0-9]+/) { -+ # check if the next lines show the sources of our candidate -+ if ($1 eq $installed->{$pkgname}{'candidate'}) { -+ $candidate_found = 1; -+ } else { -+ $candidate_found = 0; -+ } -+ } elsif (($line =~ / +[0-9]+ [^ ]+\/(security\.([^ ]+\.)?debian\.org|debian-security).*\/updates\//) && $candidate_found ) { -+ $installed->{$pkgname}{'security-update'} = 1; - } elsif ($line =~ /^ +\*\*\*/) { - $line = shift @lines; - my @l = split(/ +/, $line); -@@ -141,7 +153,7 @@ sub get_packages { - } - } - -- my (%current, %obsolete, %outofdate); -+ my (%current, %obsolete, %outofdate, %security_outofdate); - for my $pkgname (keys %$installed) { - my $pkg = $installed->{$pkgname}; - -@@ -151,7 +163,11 @@ sub get_packages { - } - - if ($pkg->{'candidate'} ne $pkg->{'installed'}) { -- $outofdate{$pkgname} = $pkg; -+ if ($pkg->{'security-update'}) { -+ $security_outofdate{$pkgname} = $pkg; -+ } else { -+ $outofdate{$pkgname} = $pkg; -+ } - next; - }; - if ($pkg->{'origin'} eq '/var/lib/dpkg/status') { -@@ -163,6 +179,7 @@ sub get_packages { - - $pkgs{'current'} = \%current; - $pkgs{'outofdate'} = \%outofdate; -+ $pkgs{'security_outofdate'} = \%security_outofdate; - $pkgs{'obsolete'} = \%obsolete; - return \%pkgs; - } -@@ -298,6 +315,12 @@ my @reportform = ( - 'short' => "%d pc", - 'perf' => "prg_conf=%d;1;;0", - 'status' => 'WARNING' }, -+ { 'key' => 'security_outofdate', -+ 'listpackages' => 1, -+ 'long' => "%d packages with outstanding security updates: %s", -+ 'short' => "%d security-updates", -+ 'perf' => "security_outdated=%d;;1;0", -+ 'status' => 'CRITICAL' }, - ); - - my @longout; diff --git a/debian/patches/dsa/status_directory b/debian/patches/dsa/status_directory deleted file mode 100644 index f3987db..0000000 --- a/debian/patches/dsa/status_directory +++ /dev/null @@ -1,40 +0,0 @@ ---- a/dsa/sbin/dsa-update-apt-status -+++ b/dsa/sbin/dsa-update-apt-status -@@ -22,7 +22,8 @@ - # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - UPDATE_RUNS=3 --STATUS=/var/cache/dsa/nagios/apt -+STATUSDIR=/var/cache/nagios_status -+STATUS=${STATUSDIR}/apt - SLEEP_MAX=$(( 15 * 60 )) - MAX_AGE=$(( 23 * 60 * 60 )) - -@@ -50,6 +51,10 @@ run_required() { - return $norun - } - -+if [ ! -d ${STATUSDIR} ]; then -+ mkdir -p ${STATUSDIR} -+fi -+ - # do stuff only when required, or when asked to - if [ "${1:-""}" != "-f" ] ; then - run_required || exit 0 ---- a/dsa/sbin/dsa-update-unowned-file-status -+++ b/dsa/sbin/dsa-update-unowned-file-status -@@ -22,7 +22,13 @@ - # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - CUTOFF=40 --STATUS=/var/cache/dsa/nagios/nouser -+STATUSDIR=/var/cache/nagios_status -+STATUS=${STATUSDIR}/nouser -+ -+ -+if [ ! -d ${STATUSDIR} ]; then -+ mkdir -p ${STATUSDIR} -+fi - - tmp=`tempfile` - trap "rm -f '$tmp'" exit diff --git a/debian/patches/series b/debian/patches/series index bb31166..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,30 +0,0 @@ -check_rbl/pod_encoding_fix -check_ajp/return_critical_on_failed_connection -check_raid/prefer_cciss_vol_status_over_hpacucli -check_clamav/clamav_locations -check_nfsmounts/perl_module -check_nfsmounts/nfs_write_location -dsa/security_updates_critical -dsa/check_packages_location -check_libs/config_location -check_libs/config_path -dsa/status_directory -dsa/check_packages-inifile -check_email_delivery/epn -check_email_delivery/paths -check_printer/use_data_dumper_if_needed -check_printer/use_nagios_plugin -check_printer/debian_bts -check_lm_sensors/manpage_whatis_fix -check_lm_sensors/spelling_errors -check_lm_sensors/interpreter -check_rbl/interpreter -check_rbl/spelling_errors -check_rbl/disable_solid.net -check_haproxy/epn -check_httpd_status/epn -check_backuppc/use_nagios_plugins -dsa/epn -check_cups/epn -check_webinject/epn -check_snmp_time/epn