[nagiosplug] check_udp: try nc.traditional too
"Nagios Plugin Development" <[email protected]> Sat, 14 Sep 2013 22:00:48 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug
Branch: master
Commit: 6361247b4c72b2527ffef5c5c4d9672264b61941
Author: Sven Nierlein <[email protected]>
Committer: Sven Nierlein <[email protected]>
Date: Sat Sep 14 19:59:17 2013 +0200
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=6361247
check_udp: try nc.traditional too
nc.traditional is available on (at least) ubuntu systems and uses traditional nc syntax
---
plugins/t/check_udp.t | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t
index ae1718c..6ede300 100644
--- a/plugins/t/check_udp.t
+++ b/plugins/t/check_udp.t
@@ -31,7 +31,10 @@ cmp_ok( $res->return_code, '==', 2, "Errors correctly because no udp service run
like ( $res->output, '/No data received from host/', "Output OK");
my $nc;
-if(system("which netcat >/dev/null 2>&1") == 0) {
+if(system("which nc.traditional >/dev/null 2>&1") == 0) {
+ $nc = 'nc.traditional -w 3 -l -u -p 3333';
+}
+elsif(system("which netcat >/dev/null 2>&1") == 0) {
$nc = 'netcat -w 3 -l -u -p 3333';
}
elsif(system("which nc >/dev/null 2>&1") == 0) {
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk