From 52202bfc705e433a170e78529558556b0976ae71 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 13 Jan 2023 07:04:28 +0100 Subject: automatically set up agetty TERM when possible * debvm-create will now parse a new kernel cmdline debvm.term and if present will pass its value to agetty as TERM. * debvm-run will now detect whether it is running in a terminal in non-graphic mode and pass its environment TERM variable as debvm.term to the kernel cmdline thus closing the loop. --- bin/debvm-run | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin') diff --git a/bin/debvm-run b/bin/debvm-run index c2a3f21..4f7ff44 100755 --- a/bin/debvm-run +++ b/bin/debvm-run @@ -250,6 +250,9 @@ if test -z "$GRAPHICAL"; then KERNEL_CMDLINE="$KERNEL_CMDLINE console=ttyS0" ;; esac + if test -t 0 && test -t 1 && test -n "$TERM"; then + KERNEL_CMDLINE="$KERNEL_CMDLINE debvm.term=$TERM" + fi fi if test -n "$SSHPORT"; then -- cgit v1.2.3