diff options
author | Olav Vitters <olav@vitters.nl> | 2020-08-17 20:59:23 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-08-17 20:59:23 +0200 |
commit | c53dacaf7805fffa86c902a943df0fbf9c58c4f1 (patch) | |
tree | 16c3af8454ab8ae5d217d3bd957309a57392487b /mageia | |
parent | 136db83cb88d4359fe81e1351c7195bcaba1b4f0 (diff) | |
download | initscripts-c53dacaf7805fffa86c902a943df0fbf9c58c4f1.tar initscripts-c53dacaf7805fffa86c902a943df0fbf9c58c4f1.tar.gz initscripts-c53dacaf7805fffa86c902a943df0fbf9c58c4f1.tar.bz2 initscripts-c53dacaf7805fffa86c902a943df0fbf9c58c4f1.tar.xz initscripts-c53dacaf7805fffa86c902a943df0fbf9c58c4f1.zip |
lang.sh: silence consoletype warnings
Diffstat (limited to 'mageia')
-rwxr-xr-x | mageia/etc/profile.d/lang.sh | 10 |
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 ;; |