File git-29-5220a5f6ba250503ccda326e65ca069d245a5ebe.patch of Package aaa_base.17502

From 5220a5f6ba250503ccda326e65ca069d245a5ebe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 12:07:50 +0200
Subject: [PATCH] profile and csh.login: on s390x set TERM to dumb on serial
 console

for sclp_line0 and ttyS0 console (bug#1153946)

diff --git a/files/etc/csh.login b/files/etc/csh.login
index 4fb476a..59ab8eb 100644
--- a/files/etc/csh.login
+++ b/files/etc/csh.login
@@ -26,6 +26,11 @@ if ( -o /dev/$tty && -c /dev/$tty && ${?prompt} ) then
     if ( ! ${?TERM} )           setenv TERM linux
     if ( "$TERM" == "unknown" ) setenv TERM linux
     if ( "$TERM" == "ibm327x" ) setenv TERM dumb
+    if ( `uname -m` == "s390x" ) then
+	if ( "$tty" == "/dev/sclp_line0" || "$tty" == "/dev/ttyS0" ) ; then
+	    if ( "$TERM" == "vt220" ) setenv TERM dumb
+	endif
+    endif
     if ( $TERM =~ screen.* && ! -e /usr/share/terminfo/s/$TERM) setenv TERM screen
     if ( ! ${?SSH_TTY} && "$TERM" != "dumb" ) then
 	path stty sane cr0 pass8 dec
diff --git a/files/etc/profile b/files/etc/profile
index 7edc50b..f621efe 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -78,6 +78,11 @@ if test -O "$tty" -a -n "$PS1"; then
     test -z "${TERM}"		&& { TERM=linux; export TERM; }
     test "${TERM}" = "unknown"	&& { TERM=linux; export TERM; }
     test "${TERM}" = "ibm327x"	&& { TERM=dumb;  export TERM; }
+    if test "$(uname -m)" = "s390x" ; then
+	if test "$tty" = "/dev/sclp_line0" -o "$tty" = "/dev/ttyS0" ; then
+	    test "${TERM}" = "vt220" && { TERM=dumb;  export TERM; }
+	fi
+    fi
     case "$TERM" in
     screen.*)
 	test -e /usr/share/terminfo/s/${TERM} || { TERM=screen;  export TERM; } ;;
openSUSE Build Service is sponsored by