* [gentoo-commits] gentoo-vdr r638 - in gentoo-vdr-scripts/trunk: . usr/share/vdr/rcscript
@ 2008-07-30 13:54 Matthias Schwarzott (zzam)
0 siblings, 0 replies; only message in thread
From: Matthias Schwarzott (zzam) @ 2008-07-30 13:54 UTC (permalink / raw
To: gentoo-commits
Author: zzam
Date: 2008-07-30 13:54:36 +0000 (Wed, 30 Jul 2008)
New Revision: 638
Modified:
gentoo-vdr-scripts/trunk/ChangeLog
gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh
Log:
Check locale setup as does all users of it, checking LC_ALL LC_CTYPE LANG. Improved log output of locale setup.
Modified: gentoo-vdr-scripts/trunk/ChangeLog
===================================================================
--- gentoo-vdr-scripts/trunk/ChangeLog 2008-07-29 22:25:47 UTC (rev 637)
+++ gentoo-vdr-scripts/trunk/ChangeLog 2008-07-30 13:54:36 UTC (rev 638)
@@ -1,6 +1,11 @@
# ChangeLog for gentoo-vdr-scripts
# $Id$
+ 30 Jul 2008; Matthias Schwarzott <zzam@gentoo.org>
+ usr/share/vdr/rcscript/pre-start-45-locales.sh:
+ Check locale setup as does all users of it, checking LC_ALL LC_CTYPE LANG.
+ Improved log output of locale setup.
+
29 Jul 2008; Matthias Schwarzott <zzam@gentoo.org>
usr/share/vdr/rcscript/pre-start-45-locales.sh:
Tried to improve messages of locale handling code. Removed LC_MESSAGES=C
Modified: gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh
===================================================================
--- gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh 2008-07-29 22:25:47 UTC (rev 637)
+++ gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh 2008-07-30 13:54:36 UTC (rev 638)
@@ -29,16 +29,35 @@
if [ "${charmap}" = "ANSI_X3.4-1968" ]; then
# User has not set any locale stuff
- ewarn "Your locale selects an ASCII only charmap."
- if [ -n "${LANG}" ]; then
- ewarn "It seems the locale you chose does not exist on your system [LANG=${LANG}]"
- ewarn "Please have a look at /etc/locale.gen"
+ locale _ctype= _var=
+ if [ -n "${LC_ALL}" ]; then
+ _var=LC_ALL
+ elif [ -n "${LC_CTYPE}" ]; then
+ _var=LC_CTYPE
else
- ewarn "You have not set a charmap!"
- ewarn "Set LANG in either /etc/env.d/02locale or /etc/conf.d/vdr"
- ewarn "Depending on your version of baselayout only /etc/conf.d/vdr may work"
+ _var=LANG
fi
+ eval _ctype=\$$_var
+ if [ -n "${_ctype}" ]; then
+ ewarn "You set ${_var}=${_ctype}"
+
+ if locale -a | fgrep -x -q "${_ctype}"; then
+ ewarn "This locale wants to use just ASCII chars - this should not happen!"
+ else
+ ewarn "This locale does not exist on your system"
+ ewarn "Please have a look at /etc/locale.gen"
+ fi
+ else
+ ewarn "You have not set a locale/charmap!"
+ ewarn "Please set LANG in /etc/conf.d/vdr"
+
+ if [ ! -e /lib/librc.so ]; then
+ # baselayout1
+ ewarn "or do this system-wide in /etc/env.d/02locale"
+ fi
+ fi
+
# Lets guess
# try an english utf8 locale first
@@ -52,9 +71,9 @@
if [ "${l}" != "" ]; then
export LANG="${l}"
- ewarn "Automatically using locale ${l} to get most of vdr utf8 support."
+ einfo "Auto-selected locale: ${l}"
else
- ewarn "Not found any utf8 locale, you will have problems with chars extending ASCII"
+ ewarn "Did not find an utf8 locale. You may have problems with non-ASCII characters"
fi
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-30 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 13:54 [gentoo-commits] gentoo-vdr r638 - in gentoo-vdr-scripts/trunk: . usr/share/vdr/rcscript Matthias Schwarzott (zzam)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox