zamba-lxc-toolbox icon indicating copy to clipboard operation
zamba-lxc-toolbox copied to clipboard

Update locale non interactive

Open LAWA-IT-Service opened this issue 3 years ago • 5 comments

Changing the locale via script is possible in the following way

sed -i "s/^#.$LXC_LOCALE/$LXC_LOCALE/" /etc/locale.gen locale-gen $LXC_LOCALE echo LANG=$LXC_LOCALE > /etc/default/locale echo LANGUAGE=$LXC_LOCALE >> /etc/default/locale export LANG=$LXC_LOCALE

Hint change zamba.conf to LXC_LOCALE=de_DE.UTF-8

LAWA-IT-Service avatar Apr 20 '21 19:04 LAWA-IT-Service

Hi @LAWA-IT-Service, thanks for your Ticket. In my local copy of the dev branch I already tested a similar solution for this issue. Just made the changes in ´main` branch.

thorstenspille avatar Apr 20 '21 20:04 thorstenspille

Fixed, already included in main branch

thorstenspille avatar Apr 20 '21 21:04 thorstenspille

If the proxmox host language differs from that one configured for the LXC container, the noninteractive setting of locale is incomplete and apt will produce warnings. By default the LXC container inherits partial language settings from the proxmox host.

thorstenspille avatar Apr 21 '21 11:04 thorstenspille

maybe adding the folling exports after locale-gen

export LANG=$LXC_LOCALE export LANGUAGE=$LXC_LOCALE export LC_CTYPE=C

LAWA-IT-Service avatar Apr 21 '21 13:04 LAWA-IT-Service

setting locales ist still a piece of crap... priority=low!

thorstenspille avatar Jan 15 '22 21:01 thorstenspille

Added en_US.UTF-8 as secondary default language, this should prevent warnings in most cases.

thorstenspille avatar Feb 12 '23 15:02 thorstenspille