ctdb-tests: Don't use nc -d or -w options
authorMartin Schwenke <martin@meltin.net>
Thu, 8 Mar 2018 00:49:56 +0000 (11:49 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 9 Mar 2018 11:24:13 +0000 (12:24 +0100)
commit9e954bcbf43d67a18ee55f84cda0b09028f96b92
tree561a028153c02e731da78b85e1871b9101d264fa
parentbd66445eddd1273da034df703f6aba7864e8e542
ctdb-tests: Don't use nc -d or -w options

nmap-ncat is used in some distributions to replace netcat.  It has a
different meaning for these options.

We can get the same effect as the current combination of -d and -w by
piping a sleep process to nc.  Subsequent use of $! works because it
gets the last process in pipeline.

Note that redirecting from /dev/null doesn't work with some versions
of nc.  They just exit when they get EOF.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Mar  9 12:24:13 CET 2018 on sn-devel-144
ctdb/tests/complex/30_nfs_tickle_killtcp.sh
ctdb/tests/complex/31_nfs_tickle.sh
ctdb/tests/complex/32_cifs_tickle.sh
ctdb/tests/complex/34_nfs_tickle_restart.sh
ctdb/tests/complex/36_smb_reset_server.sh
ctdb/tests/complex/37_nfs_reset_server.sh