[PC-BSD Commits] r3243 - pcbsd/trunk/system-overlay/PCBSD/bin
svn at pcbsd.org
svn at pcbsd.org
Tue Jan 13 12:07:07 PST 2009
Author: kris
Date: 2009-01-13 12:07:07 -0800 (Tue, 13 Jan 2009)
New Revision: 3243
Modified:
pcbsd/trunk/system-overlay/PCBSD/bin/pdm
Log:
Updated pdm with a bit smarter i18n detection for kdm, check kdmrc, if that fails, check /etc/login.conf for a entry for PC-BSD users that we can use instead
Modified: pcbsd/trunk/system-overlay/PCBSD/bin/pdm
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/bin/pdm 2009-01-13 19:21:10 UTC (rev 3242)
+++ pcbsd/trunk/system-overlay/PCBSD/bin/pdm 2009-01-13 20:07:07 UTC (rev 3243)
@@ -28,7 +28,22 @@
KLANG="`grep ^Language= /PCBSD/local/kde4/share/config/kdmrc | cut -d '=' -f 2`"
if [ "$KLANG" != "" -a "${KLANG}" != "en_US" ]
then
+ # Check if we have a .UTF-8 or some other extension and add it if missing
+ echo "${KLANG}" | grep "." >/dev/null 2>/dev/null
+ if [ "$?" != "0" ]
+ then
+ KLANG="${KLANG}.UTF-8"
+ fi
+
LANG="${KLANG}" ; export LANG
+else
+ # Nothing in kdmrc, lets check the /etc/login.conf also
+ grep "PCBSD Users Accounts" /etc/login.conf > /dev/null 2>/dev/null
+ if [ "$?" = "0" ]
+ then
+ KLANG="`grep -v '#' /etc/login.conf | grep 'lang=' | cut -d ':' -f 2 | cut -d '=' -f 2 | tail -n 1`"
+ LANG="${KLANG}" ; export LANG
+ fi
fi
# Start our loop
More information about the Commits
mailing list