| Summary: | csh or tcsh login produces warning messages "consoletype is now deprecated" | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Ethan Merritt <sfeam> |
| Component: | RPM Packages | Assignee: | All Packagers <pkg-bugs> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | davidwhodgins, fboyrie, juergen.harms, mageia |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | initscripts-10.04-4.mga9.src.rpm | CVE: | |
| Status comment: | |||
|
Description
Ethan Merritt
2023-04-22 06:46:56 CEST
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" (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
Juergen Harms
2023-08-29 10:00:06 CEST
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. |