Setting language
This commit is contained in:
parent
6351c14a95
commit
e7b6f13e9b
|
@ -35,6 +35,8 @@ PROJECT_NAME='freedombone'
|
|||
export TEXTDOMAIN=$PROJECT_NAME
|
||||
export TEXTDOMAINDIR="/usr/share/locale"
|
||||
|
||||
DEFAULT_LANGUAGE='en_GB'
|
||||
|
||||
# username created by default within a debian image
|
||||
GENERIC_IMAGE_USERNAME='fbone'
|
||||
|
||||
|
@ -522,6 +524,19 @@ function show_help {
|
|||
exit 0
|
||||
}
|
||||
|
||||
function locale_setup {
|
||||
if grep -Fxq "locale_setup" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
|
||||
apt-get -y install locales debconf
|
||||
update-locale LANGUAGE=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_MESSAGES=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_ALL=${DEFAULT_LANGUAGE}.UTF-8
|
||||
update-locale LC_CTYPE=${DEFAULT_LANGUAGE}.UTF-8
|
||||
|
||||
echo 'locale_setup' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function interactive_configuration_remote_backups {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
|
@ -857,6 +872,9 @@ function read_configuration {
|
|||
if [[ $CONFIGURATION_FILE != '/root/freedombone.cfg' ]]; then
|
||||
cp $CONFIGURATION_FILE /root/freedombone.cfg
|
||||
fi
|
||||
if grep -q "DEFAULT_LANGUAGE" $CONFIGURATION_FILE; then
|
||||
DEFAULT_LANGUAGE=$(grep "DEFAULT_LANGUAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MINIMAL_INSTALL" $CONFIGURATION_FILE; then
|
||||
MINIMAL_INSTALL=$(grep "MINIMAL_INSTALL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
@ -6157,6 +6175,7 @@ function initial_setup {
|
|||
if grep -Fxq "initial_setup" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
|
||||
apt-get -y remove --purge apache*
|
||||
apt-get -y dist-upgrade
|
||||
apt-get -y install ca-certificates emacs24 cpulimit
|
||||
|
@ -11932,6 +11951,7 @@ function install_final {
|
|||
|
||||
|
||||
read_configuration
|
||||
locale_setup
|
||||
parse_args
|
||||
check_domains
|
||||
install_not_on_BBB
|
||||
|
|
|
@ -355,6 +355,7 @@ chroot "$rootdir" apt-get install -y sudo git dialog toilet build-essential open
|
|||
chroot "$rootdir" apt-get install -y avahi-daemon avahi-utils avahi-discover avahi-autoipd
|
||||
chroot "$rootdir" apt-get install -y iptables dnsutils net-tools network-manager iputils-ping
|
||||
chroot "$rootdir" apt-get install -y libnss-mdns libnss-myhostname libnss-gw-name nano man ntp
|
||||
chroot "$rootdir" apt-get install -y locales debconf
|
||||
|
||||
sed -i "s|#host-name=.*|host-name=${PROJECT_NAME}|g" $rootdir/etc/avahi/avahi-daemon.conf
|
||||
|
||||
|
|
Loading…
Reference in New Issue