File fix-setting-language-on-suse-systems.patch of Package salt

From 11c420d4d8bcace7785e1696c955bcd224023b0c Mon Sep 17 00:00:00 2001
From: Michael Calmer <mc@suse.de>
Date: Thu, 18 May 2017 19:46:50 +0200
Subject: [PATCH] fix setting language on SUSE systems

---
 salt/modules/localemod.py | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/salt/modules/localemod.py b/salt/modules/localemod.py
index e8eaf54573..272aff4cc2 100644
--- a/salt/modules/localemod.py
+++ b/salt/modules/localemod.py
@@ -135,8 +135,6 @@ def get_locale():
         return params.get('LANG', '')
     elif 'RedHat' in __grains__['os_family']:
         cmd = 'grep "^LANG=" /etc/sysconfig/i18n'
-    elif 'Suse' in __grains__['os_family']:
-        cmd = 'grep "^RC_LANG" /etc/sysconfig/language'
     elif 'Debian' in __grains__['os_family']:
         # this block only applies to Debian without systemd
         cmd = 'grep "^LANG=" /etc/default/locale'
@@ -185,15 +183,6 @@ def set_locale(locale):
             'LANG="{0}"'.format(locale),
             append_if_not_found=True
         )
-    elif 'Suse' in __grains__['os_family']:
-        if not __salt__['file.file_exists']('/etc/sysconfig/language'):
-            __salt__['file.touch']('/etc/sysconfig/language')
-        __salt__['file.replace'](
-            '/etc/sysconfig/language',
-            '^RC_LANG=.*',
-            'RC_LANG="{0}"'.format(locale),
-            append_if_not_found=True
-        )
     elif 'Debian' in __grains__['os_family']:
         # this block only applies to Debian without systemd
         update_locale = salt.utils.which('update-locale')
-- 
2.17.1


openSUSE Build Service is sponsored by