Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
salt.3514
0042-align-OS-grains-from-older-SLES-with-curre...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0042-align-OS-grains-from-older-SLES-with-current-one-bsc.patch of Package salt.3514
From 3178442c4b4d2790c700aaf421afcfb8ec7d9283 Mon Sep 17 00:00:00 2001 From: Michael Calmer <mc@suse.de> Date: Fri, 15 Apr 2016 15:40:49 +0200 Subject: [PATCH 42/42] align OS grains from older SLES with current one (bsc#975757) --- salt/grains/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/salt/grains/core.py b/salt/grains/core.py index 0c4c6f8..f730a65 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -1185,14 +1185,19 @@ def os_data(): for line in fhr: if 'enterprise' in line.lower(): grains['lsb_distrib_id'] = 'SLES' + grains['lsb_distrib_codename'] = re.sub(r'\(.+\)', '', line).strip() elif 'version' in line.lower(): version = re.sub(r'[^0-9]', '', line) elif 'patchlevel' in line.lower(): patch = re.sub(r'[^0-9]', '', line) grains['lsb_distrib_release'] = version if patch: - grains['lsb_distrib_release'] += ' SP' + patch - grains['lsb_distrib_codename'] = 'n.a' + grains['lsb_distrib_release'] += '.' + patch + patchstr = 'SP' + patch + if grains['lsb_distrib_codename'] and patchstr not in grains['lsb_distrib_codename']: + grains['lsb_distrib_codename'] += ' ' + patchstr + if not grains['lsb_distrib_codename']: + grains['lsb_distrib_codename'] = 'n.a' elif os.path.isfile('/etc/altlinux-release'): # ALT Linux grains['lsb_distrib_id'] = 'altlinux' -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor