1
0

disable-service-py-for-suse-family.patch 929 B

1234567891011121314151617181920212223242526
  1. From 372d68180c35213de57b0b0b5a4773ffa92a4e5e Mon Sep 17 00:00:00 2001
  2. From: Tim Serong <tserong@suse.com>
  3. Date: Wed, 6 Aug 2014 16:33:07 +1000
  4. Subject: [PATCH] Disable service.py for entire SUSE family >= 12
  5. Checking os_family allows us to pick up openSUSE and SUSE Linux Enterprise, rather than just checking for os == openSUSE.
  6. ---
  7. salt/modules/service.py | 2 +-
  8. 1 file changed, 1 insertion(+), 1 deletion(-)
  9. diff --git a/salt/modules/service.py b/salt/modules/service.py
  10. index cfafe24..d581916 100644
  11. --- a/salt/modules/service.py
  12. +++ b/salt/modules/service.py
  13. @@ -47,7 +47,7 @@ def __virtual__():
  14. if __grains__['kernel'] != 'Linux':
  15. return False
  16. # SUSE >=12.0 uses systemd
  17. - if __grains__.get('os', '') == 'openSUSE':
  18. + if __grains__.get('os_family', '') == 'SUSE':
  19. try:
  20. if int(__grains__.get('osrelease', '').split('.')[0]) >= 12:
  21. return False
  22. --
  23. 2.0.3