/etc/init.d/console-screen.sh Searches /etc/environment with wrong regexp.

Bug #18575 reported by Ralph Corderoy
6
Affects Status Importance Assigned to Milestone
console-tools (Ubuntu)
Fix Released
Medium
Colin Watson

Bug Description

/etc/init.d/console-screen.sh contains

    for var in LANG LC_ALL LC_CTYPE ; do
        value=$(egrep "^[^#]*${var}=" /etc/environment | tail -n1 | cut -d= -f2)
       eval $var=$value
    done

egrep's pattern will match FOOLANG, OLDLANG, etc., same goes for the
other values of $var causing, e.g. LANG to be assigned FOOLANG's value.

See also bug #18448. These two bugs account for both misreadings of
/etc/environment in my installation but it's possible the code has been
copied to other /etc/init.d/* scripts that I don't have; perhaps
there's a big installation somewhere that someone can grep?

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Setting to Confirmed since the script is still the same in Dapper, Ubuntu 6.06.

Changed in console-tools:
status: Unconfirmed → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

This was apparently fixed by this Debian upload, included in Feisty:

console-tools (1:0.2.3dbs-65) unstable; urgency=low

  * Remove dependency on sysvinit, to allow for upstart. Closes: #386134.
  * Remove reference to <asm/kbio.h> which has been removed from the
    sparc kernel. Closes: #386038.
  * Fix comment typo in unicode_start.
  * Fix defkeymap location in loadkeys map page. Closes: #382595.
  * Include lct-9.html in the docs. Closes: #384118.
  * Patch from Karol Lewandowski for console-screen.sh to remove
    unnecessary process spawns. Closes: #382115.
  * Add LSB logging support to console-screen.sh, patch by
    David Hardeman. Closes: #384785.
  * console-screen.sh: Don't set fonts on tty0. Closes: #366272.

 -- Alastair McKinstry <email address hidden> Tue, 5 Sep 2006 16:46:25 +0100

Changed in console-tools:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.