[PC-BSD Commits] r6274 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Thu Feb 18 12:58:25 PST 2010


Author: kris
Date: 2010-02-18 12:58:25 -0800 (Thu, 18 Feb 2010)
New Revision: 6274

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
Log:

Fixed kxkbrc generation



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2010-02-18 14:54:41 UTC (rev 6273)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-localize.sh	2010-02-18 20:58:25 UTC (rev 6274)
@@ -44,7 +44,6 @@
 
    if [ "${KEYMOD}" != "NONE" ]
    then
-     localize_key_model "$KEYMOD"
      SETXKBMAP="-model ${KEYMOD}"
      KXMODEL="${KEYMOD}"
    else
@@ -62,7 +61,6 @@
 
    if [ "${KEYVAR}" != "NONE" ]
    then
-     localize_key_variant "$KEYVAR"
      SETXKBMAP="${SETXKBMAP} -variant ${KEYVAR}"
      KXVAR="(${KEYVAR})"
    else
@@ -102,19 +100,6 @@
 
 };
 
-# Function which sets the keyboard model in kxkbrc
-localize_key_model()
-{
-  MODEL="$1"
-  KXKBRC="${FSMNT}/usr/share/skel/.kde4/share/config/kxkbrc"
-  if [ -e "${KXKBRC}" ]
-  then
-    sed -i.bak "s/Model=pc104/Model=${MODEL}/" ${KXKBRC}
-    sed -i.bak "s/CHANGEME/${SETLANG}/" ${KXKBRC}
-  fi
-
-};
-
 localize_key_layout()
 {
 
@@ -152,20 +137,8 @@
     echo "keymap=\"${KEYLAYOUT_CONSOLE}\"" >>${FSMNT}/etc/rc.conf
   fi
 
-  # Now localize any xorg layouts
-  KXKBRC="${FSMNT}/usr/share/skel/.kde4/share/config/kxkbrc"
-  if [ -e "${KXKBRC}" ]
-  then
-    sed -i.bak "s/CHANGEME/${KEYLAYOUT},us/g" ${KXKBRC}
-  fi
-
 };
 
-localize_key_variant()
-{
-
-};
-
 # Function which sets COUNTRY SETLANG and LOCALE based upon $1
 localize_get_codes()
 { 
@@ -357,6 +330,10 @@
 # Starts checking for localization directives
 run_localize()
 {
+  KEYLAYOUT="NONE"
+  KEYMOD="NONE"
+  KEYVAR="NONE"
+
   while read line
   do
     # Check if we need to do any localization
@@ -379,54 +356,44 @@
 
     # Check if we need to do any keylayouts
     echo $line | grep "^localizeKeyLayout=" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
-    then
+    if [ "$?" = "0" ] ; then
       get_value_from_string "$line"
       KEYLAYOUT="$VAL"
-    else
-      KEYLAYOUT="NONE"
     fi
 
     # Check if we need to do any key models
     echo $line | grep "^localizeKeyModel=" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
-    then
+    if [ "$?" = "0" ] ; then
       get_value_from_string "$line"
       KEYMOD="$VAL"
-    else
-      KEYMOD="NONE"
     fi
 
     # Check if we need to do any key variant
     echo $line | grep "^localizeKeyVariant=" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
-    then
+    if [ "$?" = "0" ] ; then
       get_value_from_string "$line"
       KEYVAR="$VAL"
-    else
-      KEYVAR="NONE"
     fi
 
-    # Do our localization
-    localize_x_keyboard "${KEYMOD}" "${KEYLAYOUT}" "${KEYVAR}"
 
     # Check if we need to set a timezone
     echo $line | grep "^timeZone=" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
-    then
+    if [ "$?" = "0" ] ; then
       get_value_from_string "$line"
       set_timezone "$VAL"
     fi
 
     # Check if we need to set a timezone
     echo $line | grep "^enableNTP=" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
-    then
+    if [ "$?" = "0" ] ; then
       get_value_from_string "$line"
       set_ntp "$VAL"
     fi
   done <${CFGF}
 
+  # Do our keyboard localization
+  localize_x_keyboard "${KEYMOD}" "${KEYLAYOUT}" "${KEYVAR}"
+
   # Update the login.conf db, even if we didn't localize, its a good idea to make sure its up2date
   run_chroot_cmd "/usr/bin/cap_mkdb /etc/login.conf" >/dev/null 2>/dev/null
 



More information about the Commits mailing list