diff options
author | Sven Nierlein <Sven.Nierlein@consol.de> | 2013-09-14 17:59:17 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@consol.de> | 2013-09-14 17:59:17 (GMT) |
commit | 6361247b4c72b2527ffef5c5c4d9672264b61941 (patch) | |
tree | b20915d71c110d3c47a0100e4aecef06a5e148fc /plugins | |
parent | 7b122f13dbb0bd714b47e1181ba36bfbb3bd7658 (diff) | |
download | monitoring-plugins-6361247b4c72b2527ffef5c5c4d9672264b61941.tar.gz |
check_udp: try nc.traditional too
nc.traditional is available on (at least) ubuntu systems and uses traditional nc syntax
Diffstat (limited to 'plugins')
-rw-r--r-- | 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 | |||
31 | like ( $res->output, '/No data received from host/', "Output OK"); | 31 | like ( $res->output, '/No data received from host/', "Output OK"); |
32 | 32 | ||
33 | my $nc; | 33 | my $nc; |
34 | if(system("which netcat >/dev/null 2>&1") == 0) { | 34 | if(system("which nc.traditional >/dev/null 2>&1") == 0) { |
35 | $nc = 'nc.traditional -w 3 -l -u -p 3333'; | ||
36 | } | ||
37 | elsif(system("which netcat >/dev/null 2>&1") == 0) { | ||
35 | $nc = 'netcat -w 3 -l -u -p 3333'; | 38 | $nc = 'netcat -w 3 -l -u -p 3333'; |
36 | } | 39 | } |
37 | elsif(system("which nc >/dev/null 2>&1") == 0) { | 40 | elsif(system("which nc >/dev/null 2>&1") == 0) { |