summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorRobert Schweikert <rjschwei@suse.com>2016-09-15 14:27:55 -0400
committerScott Moser <smoser@brickies.net>2016-09-15 14:29:48 -0400
commitf94b16cea578062c8abf3dd3a1ada234fa671cd3 (patch)
treec099c87eb7c672dce0194c1f3d18655ed3d45ba1 /cloudinit
parent3705bb5964a2ff3f9a67265e6d090a112b35e40c (diff)
downloadvyos-cloud-init-f94b16cea578062c8abf3dd3a1ada234fa671cd3.tar.gz
vyos-cloud-init-f94b16cea578062c8abf3dd3a1ada234fa671cd3.zip
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.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/util.py3
1 files changed, 2 insertions, 1 deletions
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