[PC-BSD Commits] r1944 - in pcbsd/trunk: installcd-overlay/usr/local/pcbsd/scripts system-overlay/etc

svn at pcbsd.org svn at pcbsd.org
Wed May 21 13:54:52 PDT 2008


Author: melkor
Date: 2008-05-21 13:54:52 -0700 (Wed, 21 May 2008)
New Revision: 1944

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh
   pcbsd/trunk/system-overlay/etc/csh.cshrc
   pcbsd/trunk/system-overlay/etc/profile
Log:

Change localization strategy to use user profiles



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh	2008-05-21 18:56:28 UTC (rev 1943)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Localize.sh	2008-05-21 20:54:52 UTC (rev 1944)
@@ -28,6 +28,9 @@
        SETLANG="es:ca"
        LOCALE="ca_ES"
        SETKDMLANG="es:ca" ;;
+   be) COUNTRY="be"
+       SETLANG="be"
+       LOCALE="be_BY" ;;
    bn) COUNTRY="bn" 
        SETLANG="bn"
        LOCALE="en_US"
@@ -182,22 +185,36 @@
 
 # Change the profile and csh.cshrc file
 ###########################################################################
-if [ "${LOCALE}" != "en_US" ]
-then
+#if [ "${LOCALE}" != "en_US" ]
+#then
+#
+#sed -e "s/en_US/${LOCALE}/g" /mnt/etc/profile > /mnt/tmp/sed
+#mv /mnt/tmp/sed /mnt/etc/profile
+#
+#sed -e "s/en_US/${LOCALE}/g" /mnt/etc/csh.cshrc > /mnt/tmp/sed
+#mv /mnt/tmp/sed /mnt/etc/csh.cshrc
+# 
+#fi
 
-sed -e "s/en_US/${LOCALE}/g" /mnt/etc/profile > /mnt/tmp/sed
-mv /mnt/tmp/sed /mnt/etc/profile
 
-sed -e "s/en_US/${LOCALE}/g" /mnt/etc/csh.cshrc > /mnt/tmp/sed
-mv /mnt/tmp/sed /mnt/etc/csh.cshrc
- 
-fi
+# Add Locale Profile to /etc/login.conf
+echo "${LANG}-utf|PCBSD Users Accounts:\
+        :charset=UTF-8:\
+        :lang=${LOCALE}.UTF-8:\
+        :tc=default:
+" >> /mnt/etc/login.conf
 
+# Build /etc/login.conf.db
+chroot /mnt /usr/bin/cap_mkdb /etc/login.conf
+
+
 # Change User Langs
 ###########################################################################
 cd /mnt/usr/home
 for i in `ls`
 do
+  #Change user locale profile
+  chroot /mnt /usr/sbin/pw ${i} -L ${LANG}-utf
 
   if [ -f "/mnt/usr/home/${i}/.kde/share/config/kdeglobals" ]
   then

Modified: pcbsd/trunk/system-overlay/etc/csh.cshrc
===================================================================
--- pcbsd/trunk/system-overlay/etc/csh.cshrc	2008-05-21 18:56:28 UTC (rev 1943)
+++ pcbsd/trunk/system-overlay/etc/csh.cshrc	2008-05-21 20:54:52 UTC (rev 1944)
@@ -1,8 +1,8 @@
 # $FreeBSD: src/etc/csh.cshrc,v 1.3 1999/08/27 23:23:40 peter Exp $
 #
 # System-wide .cshrc file for csh(1).
-setenv LANG en_US.UTF-8
-setenv LC_CTYPE en_US.UTF-8
-setenv LC_COLLATE POSIX
+#setenv LANG en_US.UTF-8
+#setenv LC_CTYPE en_US.UTF-8
+#setenv LC_COLLATE POSIX
 setenv QMAKESPEC freebsd-g++
 setenv QTDIR /usr/local

Modified: pcbsd/trunk/system-overlay/etc/profile
===================================================================
--- pcbsd/trunk/system-overlay/etc/profile	2008-05-21 18:56:28 UTC (rev 1943)
+++ pcbsd/trunk/system-overlay/etc/profile	2008-05-21 20:54:52 UTC (rev 1944)
@@ -16,8 +16,8 @@
 # msgs -f
 # Allow terminal messages
 # mesg y
-LANG="en_US.UTF-8"; export LANG
-LC_CTYPE="en_US.UTF-8"; export LC_CTYPE
-LC_COLLATE="POSIX"; export LC_COLLATE
+#LANG="en_US.UTF-8"; export LANG
+#LC_CTYPE="en_US.UTF-8"; export LC_CTYPE
+#LC_COLLATE="POSIX"; export LC_COLLATE
 QTDIR="/usr/local"; export QTDIR
 QMAKESPEC="freebsd-g++"; export QMAKESPEC



More information about the Commits mailing list