forked from pool/cloud-init
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
|
From eb504025c76909175ab2d00c25232b89faf01ab4 Mon Sep 17 00:00:00 2001
|
||
|
From: Robert Schweikert <rjschwei@suse.com>
|
||
|
Date: Sun, 21 Oct 2018 08:28:21 -0400
|
||
|
Subject: [PATCH 1/2] - Follow the ever bouncing ball for openSUSE distribution
|
||
|
identification + openSUSE changed from identifying itself as "opensuse" in
|
||
|
os-release to "opensuse-tumbleweed" and "opensuse-leap". This breaks
|
||
|
template expansion
|
||
|
|
||
|
---
|
||
|
cloudinit/util.py | 7 ++++---
|
||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/cloudinit/util.py b/cloudinit/util.py
|
||
|
index c67d6be6..7800f7bc 100644
|
||
|
--- a/cloudinit/util.py
|
||
|
+++ b/cloudinit/util.py
|
||
|
@@ -615,8 +615,8 @@ def get_linux_distro():
|
||
|
distro_name = os_release.get('ID', '')
|
||
|
distro_version = os_release.get('VERSION_ID', '')
|
||
|
if 'sles' in distro_name or 'suse' in distro_name:
|
||
|
- # RELEASE_BLOCKER: We will drop this sles ivergent behavior in
|
||
|
- # before 18.4 so that get_linux_distro returns a named tuple
|
||
|
+ # RELEASE_BLOCKER: We will drop this sles divergent behavior in
|
||
|
+ # the future so that get_linux_distro returns a named tuple
|
||
|
# which will include both version codename and architecture
|
||
|
# on all distributions.
|
||
|
flavor = platform.machine()
|
||
|
@@ -668,7 +668,8 @@ def system_info():
|
||
|
var = 'ubuntu'
|
||
|
elif linux_dist == 'redhat':
|
||
|
var = 'rhel'
|
||
|
- elif linux_dist in ('opensuse', 'sles'):
|
||
|
+ elif linux_dist in (
|
||
|
+ 'opensuse', 'opensuse-tumbleweed', 'opensuse-leap', 'sles'):
|
||
|
var = 'suse'
|
||
|
else:
|
||
|
var = 'linux'
|
||
|
--
|
||
|
2.13.7
|
||
|
|