check for /etc/locale.gen

Fixes #17245.
This commit is contained in:
Justin Findlay 2015-05-03 15:21:55 -06:00
parent c399b8f568
commit 101199ac14

View File

@ -261,7 +261,7 @@ def gen_locale(locale):
log.error('The provided locale "{0}" is not found in {1}'.format(locale, search)) log.error('The provided locale "{0}" is not found in {1}'.format(locale, search))
return False return False
if on_debian or on_gentoo: if os.path.exists('/etc/locale.gen'):
__salt__['file.replace']( __salt__['file.replace'](
'/etc/locale.gen', '/etc/locale.gen',
r'^#\s*{0}$'.format(locale), r'^#\s*{0}$'.format(locale),