#! /bin/sh PREREQ="" DESCRIPTION="Setting up system locale" [ -r /scripts/functions ] && . /scripts/functions prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac log_begin_msg "$DESCRIPTION" # commandline for x in $(cat /proc/cmdline); do case $x in locale=*) locale=${x#locale=} set_locale="true" ;; esac done if [ "${set_locale}" ]; then sed -i -e "s|\(LANG=\).*|LANG=${locale}|" ${rootmnt}/etc/locale.conf fi # Setup language in lightdm. if [ -r "${rootmnt}/etc/lightdm.conf" ]; then sed -i -e "s|^\#\(language=\).*|\1${locale}.utf8|" \ ${rootmnt}/etc/lightdm.conf fi log_end_msg