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

+8 -5
+8 -5
nixos/modules/testing/test-instrumentation.nix
··· 20 export USER=root 21 export HOME=/root 22 export DISPLAY=:0.0 23 source /etc/profile 24 cd /tmp 25 exec < /dev/hvc0 > /dev/hvc0 26 while ! exec 2> /dev/ttyS0; do sleep 0.1; done ··· 37 # with EIO). Likewise for hvc0. 38 systemd.services."serial-getty@ttyS0".enable = false; 39 systemd.services."serial-getty@hvc0".enable = false; 40 - 41 - # Don't use a pager when executing backdoor actions. Because we 42 - # use a tty, commands like systemctl or nix-store get confused 43 - # into thinking they're running interactively. 44 - environment.variables.PAGER = ""; 45 46 boot.initrd.preDeviceCommands = 47 ''
··· 20 export USER=root 21 export HOME=/root 22 export DISPLAY=:0.0 23 + 24 source /etc/profile 25 + 26 + # Don't use a pager when executing backdoor 27 + # actions. Because we use a tty, commands like systemctl 28 + # or nix-store get confused into thinking they're running 29 + # interactively. 30 + export PAGER= 31 + 32 cd /tmp 33 exec < /dev/hvc0 > /dev/hvc0 34 while ! exec 2> /dev/ttyS0; do sleep 0.1; done ··· 45 # with EIO). Likewise for hvc0. 46 systemd.services."serial-getty@ttyS0".enable = false; 47 systemd.services."serial-getty@hvc0".enable = false; 48 49 boot.initrd.preDeviceCommands = 50 ''