summaryrefslogtreecommitdiff
path: root/cloudinit/distros/opensuse.py
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2017-08-16 16:50:07 -0500
committerScott Moser <smoser@brickies.net>2017-08-30 21:10:08 -0400
commit7e76c57b590c7c2c13f7b1a2a8b5b7d4f2d18396 (patch)
treef0eb82212d46bc6373e104c864ab9810663a7417 /cloudinit/distros/opensuse.py
parent300e4516f78dbb0a9533749aa84f7e366b023d04 (diff)
downloadvyos-cloud-init-7e76c57b590c7c2c13f7b1a2a8b5b7d4f2d18396.tar.gz
vyos-cloud-init-7e76c57b590c7c2c13f7b1a2a8b5b7d4f2d18396.zip
distro: allow distro to specify a default locale
Currently the cloud-init default locale (en_US.UTF-8) is set by the base datasource class. This patch allows a distro to overide the fallback value with one that's available in the distro but continues to respect an image which has preconfigured a locale. - Distro object now has a get_locale method which will return a preconfigure locale setting by checking the distros locale system configuration file. If not set or not present, return the default locale of en_US.UTF-8 which retains behavior of all previous cloud-init releases. - Apply locale now handles regenerating locales or system configuration files as needed. - Adjust apply_locale logic to skip locale-regen if the specified LANG value is C.UTF-8,C, or POSIX; they do not require regeneration. - Further add unittests to exercise the default paths for Ubuntu and non-ubuntu paths to validate they get the LANG expected.
Diffstat (limited to 'cloudinit/distros/opensuse.py')
0 files changed, 0 insertions, 0 deletions