aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmageia/etc/profile.d/lang.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/mageia/etc/profile.d/lang.sh b/mageia/etc/profile.d/lang.sh
index f90c0795..59cdcf17 100755
--- a/mageia/etc/profile.d/lang.sh
+++ b/mageia/etc/profile.d/lang.sh
@@ -65,13 +65,13 @@ if [ "$LC_SOURCED" = 1 ]; then
consoletype=$CONSOLETYPE
if [ -z "$consoletype" ]; then
- consoletype=$(/sbin/consoletype stdout)
+ consoletype=$(/sbin/consoletype stdout 2> /dev/null)
fi
if [ -n "$CHARSET" ]; then
case $CHARSET in
8859-1|8859-2|8859-5|8859-8|8859-15|KOI*)
- if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
+ if [ "$TERM" = "linux" && tty | grep --quiet -e '/dev/tty'; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
@@ -79,7 +79,7 @@ if [ "$LC_SOURCED" = 1 ]; then
elif [ -n "$SYSFONTACM" ]; then
case $SYSFONTACM in
iso01*|iso02*|iso05*|iso08*|iso15*|koi*|latin2-ucw*)
- if [ "$TERM" = "linux" -a "$consoletype" = "vt" ]; then
+ if [ "$TERM" = "linux" && tty | grep --quiet -e '/dev/tty'; then
echo -n -e '\033(K' 2>/dev/null > /proc/$$/fd/0
fi
;;
@@ -90,7 +90,7 @@ if [ "$LC_SOURCED" = 1 ]; then
*.utf8*|*.UTF-8*)
if [ "$TERM" = "linux" ]; then
if [ "$consoletype" = "vt" ]; then
- if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
+ if [ -x /bin/unicode_start ] && /sbin/consoletype fg 2> /dev/null ; then
for langfile in /etc/sysconfig/i18n "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile
done
@@ -124,7 +124,7 @@ if [ "$LC_SOURCED" = 1 ]; then
en_IN*) ;;
*_IN*) LANG=en_US ;;
esac
- [ -x /bin/unicode_stop ] && /sbin/consoletype fg && /bin/unicode_stop
+ [ -x /bin/unicode_stop ] && /sbin/consoletype fg 2> /dev/null && /bin/unicode_stop
fi
fi
;;