summary refs log tree commit diff
path: root/modules/testing/test-instrumentation.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-06-20 15:33:44 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-06-20 15:33:44 +0000
commit20a88efffa6a69b97a293b3a923c052501a964d7 (patch)
treea4362b6eeea9522273745897ce39b3bbbb73f0f6 /modules/testing/test-instrumentation.nix
parent411139148df295dd9d620d9fc4f073d1af2c862d (diff)
downloadnixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar.gz
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar.bz2
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar.lz
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar.xz
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.tar.zst
nixpkgs-20a88efffa6a69b97a293b3a923c052501a964d7.zip
* Fix networking in the installer test.
* If connecting to the host fails in the guest, then shutdown
  immediately.

svn path=/nixos/branches/boot-order/; revision=22341
Diffstat (limited to 'modules/testing/test-instrumentation.nix')
-rw-r--r--modules/testing/test-instrumentation.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix
index 2515edf6192..655cda31ed6 100644
--- a/modules/testing/test-instrumentation.nix
+++ b/modules/testing/test-instrumentation.nix
@@ -24,7 +24,8 @@ in
   config = {
 
     jobs.backdoor =
-      { startOn = "started network-interfaces";
+      { startOn = "ip-up";
+        stopOn = "never";
         
         script =
           ''
@@ -35,10 +36,12 @@ in
             source /etc/profile
             cd /tmp
             echo "connecting to host..." > /dev/ttyS0
-            exec ${pkgs.socat}/bin/socat tcp:10.0.2.6:23 exec:${rootShell} 2> /dev/ttyS0
+            ${pkgs.socat}/bin/socat tcp:10.0.2.6:23 exec:${rootShell} 2> /dev/ttyS0 || poweroff -f
           '';
+
+        respawn = false;
       };
-  
+
     boot.postBootCommands =
       ''
         # Panic on out-of-memory conditions rather than letting the