summaryrefslogtreecommitdiffstats
path: root/nixos/modules/testing
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-23 11:53:08 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-23 11:56:09 +0100
commit6f6e2c430fbe51ccb6b803134236af0d9aa85e55 (patch)
treeb87c64c2205457dc3b62597fc4eba49aa5325ba2 /nixos/modules/testing
parent806b27a2977e9b87af9aa5e8d23a9415fb1095d3 (diff)
test-instrumentation.nix: Only clear $PAGER in the backdoor shell
Diffstat (limited to 'nixos/modules/testing')
-rw-r--r--nixos/modules/testing/test-instrumentation.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index c233beb63ca7..f0f56b17f20f 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -20,7 +20,15 @@ let kernel = config.boot.kernelPackages.kernel; in
export USER=root
export HOME=/root
export DISPLAY=:0.0
+
source /etc/profile
+
+ # Don't use a pager when executing backdoor
+ # actions. Because we use a tty, commands like systemctl
+ # or nix-store get confused into thinking they're running
+ # interactively.
+ export PAGER=
+
cd /tmp
exec < /dev/hvc0 > /dev/hvc0
while ! exec 2> /dev/ttyS0; do sleep 0.1; done
@@ -38,11 +46,6 @@ let kernel = config.boot.kernelPackages.kernel; in
systemd.services."serial-getty@ttyS0".enable = false;
systemd.services."serial-getty@hvc0".enable = false;
- # Don't use a pager when executing backdoor actions. Because we
- # use a tty, commands like systemctl or nix-store get confused
- # into thinking they're running interactively.
- environment.variables.PAGER = "";
-
boot.initrd.preDeviceCommands =
''
echo 600 > /proc/sys/kernel/hung_task_timeout_secs