test-instrumentation.nix: Only clear $PAGER in the backdoor shell

wip/yesman
Eelco Dolstra 8 years ago
parent 806b27a297
commit 6f6e2c430f
  1. 13
      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

Loading…
Cancel
Save