bashclub / zamba-lxc-toolbox

Zamba LXC Toolbox a script collection to setup LXC containers on Proxmox + ZFS. Zamba is the fusion of ZFS and Samba (standalone, active directory dc or active directory member), preconfigured to access ZFS snapshots by "Previous Versions" to easily recover encrypted by ransomware files, accidently deleted files or just to revert changes.
https://aow.de/
GNU General Public License v3.0
303 stars 66 forks source link

Update locale non interactive #22

Closed LAWA-IT-Service closed 1 year ago

LAWA-IT-Service commented 3 years ago

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

thorstenspille commented 3 years ago

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 commented 3 years ago

Fixed, already included in main branch

thorstenspille commented 3 years ago

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.

LAWA-IT-Service commented 3 years ago

maybe adding the folling exports after locale-gen

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

thorstenspille commented 2 years ago

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

thorstenspille commented 1 year ago

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