mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #6264 from sitepoint/debian_locales_fix
[patch] More reliably fetch locale LANG env
This commit is contained in:
commit
4a1b3a52b7
@ -88,9 +88,9 @@ def get_locale():
|
||||
if 'Arch' in __grains__['os_family']:
|
||||
return _localectl_get()
|
||||
elif 'RedHat' in __grains__['os_family']:
|
||||
cmd = 'grep LANG /etc/sysconfig/i18n | grep -vE "^#"'
|
||||
cmd = 'grep "^LANG=" /etc/sysconfig/i18n'
|
||||
elif 'Debian' in __grains__['os_family']:
|
||||
cmd = 'grep LANG /etc/default/locale | grep -vE "^#"'
|
||||
cmd = 'grep "^LANG=" /etc/default/locale'
|
||||
elif 'Gentoo' in __grains__['os_family']:
|
||||
cmd = 'eselect --brief locale show'
|
||||
return __salt__['cmd.run'](cmd).strip()
|
||||
|
Loading…
Reference in New Issue
Block a user