r7054 - in /vdr/vdr/trunk/debian: changelog config-loader.sh

tiber-guest at users.alioth.debian.org tiber-guest at users.alioth.debian.org
Mon Jul 14 18:15:15 UTC 2008


Author: tiber-guest
Date: Mon Jul 14 18:15:14 2008
New Revision: 7054

URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/?sc=1&rev=7054
Log:
Setting VDR_LANG now takes care of /etc/default/locale if available,
otherwise uses /etc/environment or falls back to "C" (Closes: #490651)

Modified:
    vdr/vdr/trunk/debian/changelog
    vdr/vdr/trunk/debian/config-loader.sh

Modified: vdr/vdr/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/changelog?rev=7054&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/changelog (original)
+++ vdr/vdr/trunk/debian/changelog Mon Jul 14 18:15:14 2008
@@ -8,8 +8,10 @@
     on. This way only plugins compiled for the specified ABI version can be
     installed, allowing us to remove the runtime patch level test.
     (Closes: #489914)
-
- -- Tobias Grimm <tg at e-tobi.net>  Thu, 10 Jul 2008 03:08:07 +0200
+  * Setting VDR_LANG now takes care of /etc/default/locale if available,
+    otherwise uses /etc/environment or falls back to "C" (Closes: #490651)
+
+ -- Tobias Grimm <tg at e-tobi.net>  Mon, 14 Jul 2008 20:13:43 +0200
 
 vdr (1.6.0-4) unstable; urgency=high
 

Modified: vdr/vdr/trunk/debian/config-loader.sh
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/config-loader.sh?rev=7054&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/config-loader.sh (original)
+++ vdr/vdr/trunk/debian/config-loader.sh Mon Jul 14 18:15:14 2008
@@ -59,11 +59,14 @@
 # on startup
 KEYB_TTY_SWITCH=0
 
-# get locale which is used for running vdr from /etc/environment, in case of 
-# an error, use "C"
-[ -e /etc/environment ] && . /etc/environment
-[ -z "$LANG" ] && LANG="C"
-VDR_LANG=$LANG
+# get locale which is used for running vdr from /etc/default/locale or
+# /etc/environment or fall back to "C"
+ENV_FILE="none"
+[ -r /etc/environment ] && ENV_FILE="/etc/environment"
+[ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
+[ $ENV_FILE = none ] || \
+  VDR_LANG=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
+[ -z "$VDR_LANG" ] && VDR_LANG="C"
 
 # Enable VFAT file system support by default
 VFAT=1




More information about the pkg-vdr-dvb-changes mailing list