mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
[fix] Manage the case where there is no en_US locale commented
I found a french vps provider with this issue
This commit is contained in:
parent
341cd4d4ac
commit
c6619d9b7e
1 changed files with 6 additions and 1 deletions
|
@ -528,7 +528,12 @@ function fix_locales() {
|
||||||
command -v locale-gen > /dev/null || apt_get_wrapper -o Dpkg::Options::="--force-confold" -y install locales
|
command -v locale-gen > /dev/null || apt_get_wrapper -o Dpkg::Options::="--force-confold" -y install locales
|
||||||
|
|
||||||
# Generate at least en_US.UTF-8
|
# Generate at least en_US.UTF-8
|
||||||
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
|
if grep "en_US.UTF-8" /etc/locale.gen; then
|
||||||
|
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen
|
||||||
|
else
|
||||||
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||||
|
fi
|
||||||
|
locale-gen
|
||||||
|
|
||||||
# If no /etc/environment exists, default to en_US.UTF-8
|
# If no /etc/environment exists, default to en_US.UTF-8
|
||||||
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
||||||
|
|
Loading…
Add table
Reference in a new issue