Bug 10913 - /etc/profile.d/lang.csh not working correctly
Summary: /etc/profile.d/lang.csh not working correctly
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-04-19 09:54 UTC by kazuki.kurose
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-04-19 15:17:19 UTC

Attachments (Terms of Use)

Description kazuki.kurose 2000-04-19 09:54:30 UTC
Because of errors in syntax (mainly using bash syntax in a [t]csh script)
parts of lang.csh that are supposed to send ESC(K to the terminal if the
character set is non-default fail to execute.

Even if these would be correct then the echo statement is also wrong
sending this sequence to /proc/$$/fd/0 which does not exist in current
versions of the kernel.

As the result of those erros appropriate font/mapping is not activated at
logon when using iso-02 (and possibly other charsets) even with everything
set up correctly in /etc/sysconfig/i18n.

Comment 1 Bill Nottingham 2000-04-19 15:17:59 UTC
Hm, yes, the case statement was wrong.

/proc/$$/fd does work in recent kernels, or are you talking
about 2.3.99+?   The issue is, tcsh's file descriptors seem
to start at 15...

Fixed in initscripts-5.10-1.

Comment 2 Anonymous 2000-04-19 15:23:59 UTC
The echo was redirected to /proc/$$/fd/0 which does not exist in the
distributed kernel. /proc/$$/fd/ exist. However, maybe I'm wrong and the fact
that 0 doesn't show to ls doesn't mean that it's not available for writing.

Also, I think that -e option on the echo is not working (it is specified in the
manual, but echo ignores it and echoes "-e") and I'm not sure if the redirects
in the if statement enclosed within this case statement would work in tcsh.
AFAIK in tcsh it is not possible to redirect stderr separatelly from stdout.

Comment 3 Bill Nottingham 2000-04-19 15:30:59 UTC
/proc/$$/0 doesn't seem to exist under tcsh; the file descriptors
start at 15, 16, 17, and so on.

In the new initscripts package, we use /bin/echo and
use the included 'consoletype' program to determine whether
we're on a tty.

Comment 4 Anonymous 2000-04-19 15:37:59 UTC
You are right, however lang.csh runs under tcsh. ;-)

Please consider updating that as an update to 6.2 because this causes a lot of
confusion for users in Poland who tend to use ISO-8859-2 charsets/mappings. I
have spoken with many people here who complained about not being able to make
console behave correctly with ISO-8859-2 charset. People are even installing
additional packages - like iso2console - to get their consoles to display their
national chars correctly. And I was able to get everything to work just by
correcting my lang.csh.

Anyway - thank you for your time!

Note You need to log in before you can comment on or make changes to this bug.