Bug ID 1190142
Summary tcsh error: LANG: Undefined variable
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Basesystem
Assignee screening-team-bugs@suse.de
Reporter comes@naic.edu
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

if as root I run the command:
  su - <user>
where <user> has tcsh as login shell, I got this error:
  LANG: Undefined variable
and various .csh files do not get sourced.
I tracked the problem to the file:
  /usr/etc/profile.d/lang.csh from package: aaa_base
Such file contains the following line:
  if (${?LANG}) set _save=$LANG
the purpose is clear: if the variable LANG is defined then assign its value to
_save. However variable substitution happens anyway for the whole line causing
an error if the variable LANG is not defined.
To avoid such error simply split the line like:
  if (${?LANG}) then
      set _save=$LANG
  endif
In this way if LANG is not defined the next line is never executed and $LANG is
not expanded.


You are receiving this mail because: