
Signed-off-by: Anselme, Schubert (sa246v) <sa246v@att.com> Change-Id: I4b5a5f6a7e21d790cce13a5ccff9819f517cad64
18 lines
766 B
Diff
18 lines
766 B
Diff
diff --git a/src/metadataserver/user_data/templates/snippets/maas_ipmi_autodetect_tool.py b/src/metadataserver/user_data/templates/snippets/maas_ipmi_autodetect_tool.py
|
|
index f8ca88467..530bc7d15 100755
|
|
--- a/src/metadataserver/user_data/templates/snippets/maas_ipmi_autodetect_tool.py
|
|
+++ b/src/metadataserver/user_data/templates/snippets/maas_ipmi_autodetect_tool.py
|
|
@@ -33,7 +33,11 @@ def detect_ipmi():
|
|
|
|
|
|
def is_host_moonshot():
|
|
- output = subprocess.check_output(["ipmitool", "raw", "06", "01"])
|
|
+ (status, output) = subprocess.getstatusoutput(
|
|
+ ["ipmitool", "raw", "06", "01"]
|
|
+ )
|
|
+ if status != 0:
|
|
+ return False
|
|
# 14 is the code that identifies a machine as a moonshot
|
|
if output.split()[0] == "14":
|
|
return True
|