mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
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>
This commit is contained in:
parent
e90c63712e
commit
77aa6d4ebf
1 changed files with 3 additions and 3 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue