salt/0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch
Klaus Kämpf 8bc8eaf64f Accepting request 370869 from systemsmanagement:saltstack:testing
- fix detection of base products in SLE11
  * 0030-Bugfix-on-SLE11-series-base-product-reported-as-addi.patch
- fix rpm info for SLE11
  * 0031-Only-use-LONGSIZE-in-rpm.info-if-available.-Otherwis.patch
  * 0032-Add-error-check-when-retcode-is-0-but-stderr-is-pres.patch
- fix init system detection for SLE11
  * 0033-fixing-init-system-dectection-on-sles-11-refs-31617.patch

- Re-add corrected patch:
  0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch

- Make checksum configurable (upstream still wants md5, we
  suggest sha256). bsc#955373
  Add:
  0029-Make-use-of-checksum-configurable-defaults-to-MD5-SH.patch

OBS-URL: https://build.opensuse.org/request/show/370869
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=62
2016-03-15 08:20:39 +00:00

40 lines
1.4 KiB
Diff

From ba08f6714222622467215c23c8284f992830e047 Mon Sep 17 00:00:00 2001
From: Richard McIntosh <richard.c.mcintosh@gmail.com>
Date: Thu, 10 Mar 2016 16:46:14 +0100
Subject: [PATCH 33/33] fixing init system dectection on sles 11, refs #31617
---
salt/modules/rh_service.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/salt/modules/rh_service.py b/salt/modules/rh_service.py
index 910a75d..c8ebb52 100644
--- a/salt/modules/rh_service.py
+++ b/salt/modules/rh_service.py
@@ -60,14 +60,19 @@ def __virtual__():
if __grains__['os'] in enable:
if __grains__['os'] == 'XenServer':
return __virtualname__
+
+ if __grains__['os'] == 'SUSE':
+ if str(__grains__['osrelease']).startswith('11'):
+ return __virtualname__
+ else:
+ return (False, 'Cannot load rh_service module on SUSE > 11')
+
try:
osrelease = float(__grains__.get('osrelease', 0))
except ValueError:
return (False, 'Cannot load rh_service module: '
'osrelease grain, {0}, not a float,'.format(osrelease))
- if __grains__['os'] == 'SUSE':
- if osrelease >= 12:
- return (False, 'Cannot load rh_service module on SUSE >= 12')
+
if __grains__['os'] == 'Fedora':
if osrelease > 15:
return (False, 'Cannot load rh_service module on Fedora >= 15')
--
2.1.4