From bc51cf5c8074da99ef2acf478b2cd36bbea2aaea Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 5 Apr 2014 19:08:57 +0200 Subject: [PATCH] installer.sh/installer.conf: more safe setting of LANG in /etc/locale.conf --- installer/installer.kmdr | 2 +- installer/installer.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/installer/installer.kmdr b/installer/installer.kmdr index 5e76ab7..dd6c762 100755 --- a/installer/installer.kmdr +++ b/installer/installer.kmdr @@ -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 diff --git a/installer/installer.sh b/installer/installer.sh index b1984db..809f128 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -1,5 +1,5 @@ # openmamba installation script -# Copyright (c) 2007-2013 by Silvan Calarco +# Copyright (c) 2007-2014 by Silvan Calarco # # For the devfs2gdev() function: # Copyright (c) 2006 by Davide Madrisan @@ -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}