summary refs log tree commit diff
path: root/nixos/tests/virtualbox.nix
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2016-10-30 02:52:47 +0200
committersternenseemann <git@lukasepple.de>2016-10-30 15:06:04 +0100
commite2372502d3d0503711ea792a74292373286e5c8f (patch)
treef213e1c0c10b379562acd31f7726667f5ed4114b /nixos/tests/virtualbox.nix
parent750af04badf015dfd1d9b2ec181e959b49927a42 (diff)
downloadnixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar.gz
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar.bz2
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar.lz
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar.xz
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.tar.zst
nixpkgs-e2372502d3d0503711ea792a74292373286e5c8f.zip
netcat: make netcat-openbsd the default netcat (#19411)
The motivation for this change is the following: As gnu-netcat,
e. g. does not support ipv6, it is not suitable as default netcat.

This commit also fixes all obvious build issues caused by this change.
Diffstat (limited to 'nixos/tests/virtualbox.nix')
-rw-r--r--nixos/tests/virtualbox.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix
index 02a8fc68028..376c4f21dc0 100644
--- a/nixos/tests/virtualbox.nix
+++ b/nixos/tests/virtualbox.nix
@@ -299,9 +299,9 @@ let
       -pf /run/dhclient.pid \
       -v eth0 eth1
 
-    otherIP="$(${pkgs.netcat}/bin/netcat -clp 1234 || :)"
+    otherIP="$(${pkgs.netcat}/bin/nc -l 1234 || :)"
     ${pkgs.iputils}/bin/ping -I eth1 -c1 "$otherIP"
-    echo "$otherIP reachable" | ${pkgs.netcat}/bin/netcat -clp 5678 || :
+    echo "$otherIP reachable" | ${pkgs.netcat}/bin/nc -l 5678 || :
   '';
 
   sysdDetectVirt = pkgs: ''
@@ -461,11 +461,11 @@ in mapAttrs mkVBoxTest {
     my $test1IP = waitForIP_test1 1;
     my $test2IP = waitForIP_test2 1;
 
-    $machine->succeed("echo '$test2IP' | netcat -c '$test1IP' 1234");
-    $machine->succeed("echo '$test1IP' | netcat -c '$test2IP' 1234");
+    $machine->succeed("echo '$test2IP' | nc '$test1IP' 1234");
+    $machine->succeed("echo '$test1IP' | nc '$test2IP' 1234");
 
-    $machine->waitUntilSucceeds("netcat -c '$test1IP' 5678 >&2");
-    $machine->waitUntilSucceeds("netcat -c '$test2IP' 5678 >&2");
+    $machine->waitUntilSucceeds("nc '$test1IP' 5678 >&2");
+    $machine->waitUntilSucceeds("nc '$test2IP' 5678 >&2");
 
     shutdownVM_test1;
     shutdownVM_test2;