From f94b16cea578062c8abf3dd3a1ada234fa671cd3 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Thu, 15 Sep 2016 14:27:55 -0400 Subject: dmidecode: run dmidecode only on i?86 or x86_64 arch. Dmidecode is not going to run successfully on anything other than an x86 or x86_64, just avoid running it anywhere else. --- cloudinit/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloudinit/util.py b/cloudinit/util.py index 7c37eb8f..6c5cf741 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -2337,7 +2337,8 @@ def read_dmi_data(key): # running dmidecode can be problematic on some arches (LP: #1243287) uname_arch = os.uname()[4] - if uname_arch.startswith("arm") or uname_arch == "aarch64": + if not (uname_arch == "x86_64" or + (uname_arch.startswith("i") and uname_arch[2:] == "86")): LOG.debug("dmidata is not supported on %s", uname_arch) return None -- cgit v1.2.3