mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
More reliably fetch locale LANG env
This commit is contained in:
parent
15557f7134
commit
4e0aa45163
@ -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