Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=7fb108b10894e48637823687be96f7a1d37d7ca2

commit 7fb108b10894e48637823687be96f7a1d37d7ca2
Author: Baste <ba...@frugalware.org>
Date:   Tue Nov 1 13:52:13 2011 +0100

* Add charset in /etc/profile.d/lang.sh

diff --git a/dracut/02create-squash.sh b/dracut/02create-squash.sh
index 9333a67..25e421c 100755
--- a/dracut/02create-squash.sh
+++ b/dracut/02create-squash.sh
@@ -10,9 +10,21 @@ fi
## Password root
chroot $CHROOTDIR sh -c 'echo "root:fwlive" | chpasswd'
## file /etc/profile.d/lang.sh
+#TODO:Make /etc/profile.d/less.sh, /etc/locale.conf and finish export charset
echo "export LANG=$FWLIVELANG" >$CHROOTDIR/etc/profile.d/lang.sh
echo "export LC_ALL=\$LANG" >> $CHROOTDIR/etc/profile.d/lang.sh
-#missing charset
+if [ "`echo $FWLIVELANG|sed 's/.*\.\(.*\).*/\1/'`" == utf8 ]; then
+       echo "export CHARSET=utf-8" >> $CHROOTDIR/etc/profile.d/lang.sh
+else
+       case $FWLIVELANG in
+               en_US)
+                       echo "export CHARSET=iso-8859-1" >> 
$CHROOTDIR/etc/profile.d/lang.sh ;;
+               fr_FR)
+                       echo "export CHARSET=iso-8859-15" >> 
$CHROOTDIR/etc/profile.d/lang.sh;;
+               *)
+                       echo "export CHARSET=iso-8859-15" >> 
$CHROOTDIR/etc/profile.d/lang.sh;;
+               esac
+fi
chmod +x $CHROOTDIR/etc/profile.d/lang.sh

rm -f $TREE/rootfs.img
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to