installer.sh/installer.conf: more safe setting of LANG in /etc/locale.conf

This commit is contained in:
Silvan Calarco 2014-04-05 19:08:57 +02:00
parent 10067eb5b0
commit bc51cf5c80
2 changed files with 4 additions and 3 deletions

View File

@ -953,7 +953,7 @@ if [ -r ~/.kde4/share/config/kdeglobals ]; then
*) LANGUAGE="${Language}" ;;
esac
LANGUAGE=${LANGUAGE:0:5}.UTF-8
sudo sed -i "s|LANG=.*|LANG=$LANGUAGE|" /etc/locale.conf
sudo sed -i "/^LANG=.*/d;1s/^/LANG=$LANGUAGE\n/" /etc/locale.conf
fi
fi
@execEnd

View File

@ -1,5 +1,5 @@
# openmamba installation script
# Copyright (c) 2007-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2007-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# For the devfs2gdev() function:
# Copyright (c) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
@ -361,11 +361,12 @@ dcop_write_details $"\
${MOUNT_SPACE} Mbytes copied
Installation time: $TIME_ELAPSED minutes"
CONFIGURED_FILES="/etc/sysconfig/keyboard /etc/sysconfig/i18n /etc/vconsole.conf /etc/locale.conf \
CONFIGURED_FILES="/etc/vconsole.conf /etc/locale.conf \
/etc/X11/xorg.conf /etc/X11/xorg.conf.d/10-keyboard.conf /etc/X11/xorg.conf.d/20-touchpad.conf"
for f in $CONFIGURED_FILES; do
cp $f ${MOUNTPOINT}/${f}
done
sed -i "/^LANG=.*/d;1s/^/LANG=$LANG\n/" /etc/locale.conf
echo
mkdir -p $MOUNTPOINT/{dev,home,initrd,media,mnt,proc,run,sys,tmp}