From cd4c886ba182d0dd3757da3200ba24be6ed9090c Mon Sep 17 00:00:00 2001 From: ligc Date: Wed, 30 Oct 2013 14:55:32 +0800 Subject: [PATCH] fix for rcons problem with kvm on SLES 12 and on PowerKVM --- xCAT-server/share/xcat/cons/kvm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/share/xcat/cons/kvm b/xCAT-server/share/xcat/cons/kvm index da90b01b8..7d95cd3e4 100755 --- a/xCAT-server/share/xcat/cons/kvm +++ b/xCAT-server/share/xcat/cons/kvm @@ -75,6 +75,13 @@ until ($dsthost and $speed and $dstty) { exec "sleep $sleepint"; } release_lock(); +# The screen command needs the TERM env var, +# TERM might be empty for some unknown reasons, +# for example, on SLES 12 and on PowerKVM +if (!$ENV{'TERM'}) { + $ENV{'TERM'}="vt100"; +} + exec "ssh -t $dsthost screen -U -a -O -e ^]a -d -R -S serial-".$ARGV[0]."-cons -A $dstty $speed"; #my $pathtochild= dirname($scriptname). "/";