about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2016-03-30 09:45:23 +0200
committerLluís Batlle i Rossell <viric@viric.name>2016-03-31 09:27:14 +0200
commite21dd19168a726f749a00bc96950ce2e09f9eecd (patch)
treeaa94c96795c2c17fe3670dcc94a8007a8e02a964 /pkgs/build-support
parent933e46c095d18398ffd92fbdefe52b53db54b04c (diff)
Making vm's interactive shell handle the terminal well.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/vm/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 23f95bd497909..cddca950ef488 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -66,6 +66,7 @@ rec {
       mknod -m 666 ${dev}/random  c 1 8
       mknod -m 666 ${dev}/urandom c 1 9
       mknod -m 666 ${dev}/tty     c 5 0
+      mknod -m 666 ${dev}/ttyS0   c 4 64
       mknod ${dev}/rtc     c 254 0
       . /sys/class/block/${hd}/uevent
       mknod ${dev}/${hd} b $MAJOR $MINOR
@@ -208,7 +209,7 @@ rec {
       export PATH=/bin:/usr/bin:${coreutils}/bin
       echo "Starting interactive shell..."
       echo "(To run the original builder: \$origBuilder \$origArgs)"
-      exec ${bash}/bin/sh
+      exec ${busybox}/bin/setsid ${bashInteractive}/bin/bash < /dev/ttyS0 &> /dev/ttyS0
     fi
   '';