From 6361247b4c72b2527ffef5c5c4d9672264b61941 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sat, 14 Sep 2013 19:59:17 +0200 Subject: 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/t/check_udp.t b/plugins/t/check_udp.t index ae1718c4..6ede300b 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) { -- cgit v1.2.3