aboutsummaryrefslogtreecommitdiff
path: root/plugins/t/check_udp.t
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.de> 2017-03-12 22:54:04 +0100
committerGravatar Sven Nierlein <sven@nierlein.de> 2017-03-12 22:55:52 +0100
commit77aa6d4ebf1bd3567395c92b9e5cc9daa74e9838 (patch)
tree535867da963dd4faad93b0448d15e086f1906612 /plugins/t/check_udp.t
parente90c63712e428a34b58d1e10c322af4d45f5b2a1 (diff)
downloadmonitoring-plugins-77aa6d4ebf1bd3567395c92b9e5cc9daa74e9838.tar.gz
udp test: prefer nc over netcat syntax
sles 12 systems have netcat symlinked to nc and so expect nc syntax for netcat. Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins/t/check_udp.t')
-rw-r--r--plugins/t/check_udp.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t
index 1f6fee70..6c47d095 100644
--- a/plugins/t/check_udp.t
+++ b/plugins/t/check_udp.t
@@ -34,12 +34,12 @@ my $nc;
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) {
$nc = 'nc -w 3 -l -u -4 localhost 3333';
}
+elsif(system("which netcat >/dev/null 2>&1") == 0) {
+ $nc = 'netcat -w 3 -l -u -p 3333';
+}
SKIP: {
skip "solaris netcat does not listen to udp", 6 if $^O eq 'solaris';