Description of problem: login script /etc/profile.d/lang.csh always emits warning messages: warning: consoletype is now deprecated, and will be removed in the near future! warning: use tty (1) instead! More info: 'man 1 tty' warning: consoletype is now deprecated, and will be removed in the near future! warning: use tty (1) instead! More info: 'man 1 tty' bash logins avoid this by picking up a definition for CONSOLETYPE before executing lang.sh. It would be nice to make the same happen for csh/tcsh logins. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. set login shell to tcsh 2. open a new terminal window, or other instance of login initialization 3.
Thank you for reporting this. It looks to be in initscripts, which different packagers maintain, so assigning this globally. Did not find the tsh equivalent of /etc/profile.d/lang.csh
Summary: csh or tcsh login always produces warning messages => csh or tcsh login produces warning messages "consoletype is now deprecated"Assignee: bugsquad => pkg-bugs
(In reply to Lewis Smith from comment #1) > Thank you for reporting this. > > It looks to be in initscripts, which different packagers maintain, so > assigning this globally. Did not find the tsh equivalent of > /etc/profile.d/lang.csh From "man tcsh" under "Startup and shutdown", tcsh also uses /etc/csh.cshrc which then sources /etc/profile.d/*.csh csh is part of the tcsh package.
CC: (none) => davidwhodgins
CC: (none) => juergen.harms
I think problem is in initscripts-10.04-7.mga9 in /etc/profile.d/lang.csh (sourced also by tcsh) line 20 set consoletype=`/sbin/consoletype stdout 2> /dev/null` If I put instead set consoletype=pty the message disappears. But I suppose it is a bad idea.
CC: (none) => fboyrie
(In reply to Fabrice Boyrie from comment #3) > I think problem is in initscripts-10.04-7.mga9 > > in /etc/profile.d/lang.csh (sourced also by tcsh) > line 20 > > set consoletype=`/sbin/consoletype stdout 2> /dev/null` Indeed, someone has tried to hide the warnings by redirecting stderr to /dev/null, but they have used sh/bash syntax which doesn't work in csh/tcsh. Sadly there isn't a way to redirect stderr on its own in csh/tcsh. I used this for the first occurrence: set consoletype=`/sbin/consoletype stdout |& grep -v warning` and this if { /sbin/consoletype fg >& /dev/null } then for the other two occurrences.
CC: (none) => mageia
Perhaps we should replace the use of consoletype as per the msg. On a pseudo terminal consoletype returns pty while tty returns /dev/pts/$number On a virtual terminal consoletype returns vt while tty returns /dev/tty$number I have no idea what tty returns for a serial terminal. If std input is not connected to a terminal, tty return status is 1.
(In reply to Dave Hodgins from comment #5) > I have no idea what tty returns for a serial terminal. /dev/ttyS$number What I don't know is how to determine the type for /dev/console.