SHA256
1
0
forked from pool/salt
salt/0028-fix-numerical-check-of-osrelease.patch

29 lines
1.3 KiB
Diff

From c0c8a77242cac5565febc9b08aeda7328d13e92f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Wed, 2 Mar 2016 17:29:54 +0100
Subject: [PATCH] Fix numerical check of osrelease
After making the version check numerical in 9975508 it no longer matched
SLES 11 properly to use the rh_service module as '11.4 > 11' evaluates
to true. Without using the rh_service module, not all methods are
implemented to use the service state on sle11.
---
salt/modules/rh_service.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/salt/modules/rh_service.py b/salt/modules/rh_service.py
index c425cde..910a75d 100644
--- a/salt/modules/rh_service.py
+++ b/salt/modules/rh_service.py
@@ -66,8 +66,8 @@ def __virtual__():
return (False, 'Cannot load rh_service module: '
'osrelease grain, {0}, not a float,'.format(osrelease))
if __grains__['os'] == 'SUSE':
- if osrelease > 11:
- return (False, 'Cannot load rh_service module on SUSE >= 11')
+ 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')