Package: console-common
Version: 0.7.80
Severity: normal
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch jaunty

console-common/debian/keymap.sh suffers from the same problem as
console-tools used to do, documented in #364797:

  console-tools: console-screen.sh will grep noise instead of 
LANG/LC_ALL/LC_TYPE

The attached patch fixes this, also syncing that part of the code up
with the state following #382115.

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]
  * Resynchronise debian/keymap.sh with console-screen.sh from
    console-tools, fixing dubious grepping of /etc/environment and
    /etc/default/locale.

diff -Nru console-common.orig/debian/keymap.sh console-common/debian/keymap.sh
--- console-common.orig/debian/keymap.sh	2008-04-29 08:15:14.000000000 +0100
+++ console-common/debian/keymap.sh	2008-11-20 13:54:03.000000000 +0000
@@ -64,17 +64,10 @@
 	[ -x /usr/bin/unicode_start ] || [ -x /bin/unicode_start ] ||  return
 	[ -x /usr/bin/unicode_stop ] || [ -x /bin/unicode_stop ] || return
 
-	ENV_FILE="none"
+	ENV_FILE=""
 	[ -r /etc/environment ] && ENV_FILE="/etc/environment"
 	[ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale" 
-	[ $ENV_FILE = none ] && return
-	
-	for var in LANG LC_ALL LC_CTYPE; do
-		value=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
-		eval $var=$value
-	done
-
-	CHARMAP=$(set -a && . "$ENV_FILE" && locale charmap)
+	[ "$ENV_FILE" ] && CHARMAP=$(set -a && . "$ENV_FILE" && locale charmap)
 	if [ "$CHARMAP" = "UTF-8" ]; then
 		unicode_start 2> /dev/null || true
 	else

Reply via email to