[PC-BSD Commits] r758 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Wed Sep 19 12:00:17 PDT 2007


Author: kris
Date: 2007-09-19 12:00:15 -0700 (Wed, 19 Sep 2007)
New Revision: 758

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SaveKeyboard.sh
Log:

Put fix into place for setting keyboard layout in kxkbrc tool



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SaveKeyboard.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SaveKeyboard.sh	2007-09-19 02:40:00 UTC (rev 757)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SaveKeyboard.sh	2007-09-19 19:00:15 UTC (rev 758)
@@ -13,6 +13,25 @@
 mga-3d-enable.xorg.conf"
 
 
+# Change KDE keyboard model
+change_kxkbrc() {
+    kbdmodel=$1
+
+    KXKBRC="/mnt/usr/share/skel/.kde/share/config/kxkbrc"
+    KXKBRC_TMP="/mnt/kxkbrc.tmp"
+    cp ${KXKBRC} ${KXKBRC_TMP}
+    sed "s/Model=pc104/Model=${kbdmodel}/" < ${KXKBRC_TMP} > ${KXKBRC}
+
+    for i in `ls /mnt/usr/home`
+    do
+	KXKBRC="/mnt/usr/home/${i}/.kde/share/config/kxkbrc"
+	cp ${KXKBRC} ${KXKBRC_TMP}
+	sed "s/Model=pc104/Model=${kbdmodel}/" < ${KXKBRC_TMP} > ${KXKBRC}
+    done
+    rm -f ${KXKBRC_TMP}
+}
+
+
 # Make sure they keyboard layout is saved
 for i in $HEADERS
 do
@@ -60,6 +79,8 @@
 sed "s/\"pc105\"/\"abnt2\"/" < ${XF86_TMP_CFG} > ${XF86_CFG}
 rm -f ${XF86_TMP_CFG}
 
+change_kxkbrc "abnt2" 
+
 done
 
 # Do it for the saved configuration as well
@@ -97,6 +118,8 @@
 sed "s/\"pc105\"/\"jp106\"/" < ${XF86_TMP_CFG} > ${XF86_CFG}
 rm -f ${XF86_TMP_CFG}
 
+change_kxkbrc "jp106"
+
 done
 
 # Do it for the saved configuration as well



More information about the Commits mailing list