From e21dd19168a726f749a00bc96950ce2e09f9eecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 30 Mar 2016 09:45:23 +0200 Subject: [PATCH] Making vm's interactive shell handle the terminal well. --- pkgs/build-support/vm/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 23f95bd49790..cddca950ef48 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 '';