if [ -d /root/etc/default/kdm.d/ ]
then
- printf 'LANGUAGE=%s\n' "${LANG}" >> /root/etc/default/kdm.d/live-autologin
+ if ! grep -qs "^LANGUAGE" "${LANG}"
+ then
+ printf 'LANGUAGE=%s\n' "${LANG}" >> /root/etc/default/kdm.d/live-autologin
+ fi
elif [ -f /root/etc/kde3/kdm/kdmrc ]
then
sed -i -r -e "s/#Language=.*/Language=${language}/" \
really_export LANG
- printf 'LANG="%s"\n' "${LANG}" >> /root/etc/default/locale
- printf 'LANG="%s"\n' "${LANG}" >> /root/etc/environment
+ printf 'LANG="%s"\n' "${LANG}" > /root/etc/default/locale
+ printf 'LANG="%s"\n' "${LANG}" > /root/etc/environment
printf '%s %s\n' "${LANG}" "${codepage}" > /root/etc/locale.gen
if [ -z "${SILENT}" ]
then
chroot /root /usr/sbin/locale-gen
else
- chroot /root /usr/sbin/local-gen > /dev/null 2>&1
+ chroot /root /usr/sbin/locale-gen > /dev/null 2>&1
fi
fi