Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,11 @@ public static String fetchLocalUuid() {
uuid = localUuid;
return uuid;
}
String result = ExcuteLinux.exeCmd("dmidecode | grep UUID");
if (StringUtils.isNotEmpty(result)
&& StringUtils.containsIgnoreCase(result, "UUID")) {
uuid = result.split(":")[1].trim();
String result = ExcuteLinux.exeCmd(new String[]{"dmidecode", "-s", "system-uuid"});
Comment thread
spiritxishi marked this conversation as resolved.
Outdated
if (StringUtils.isEmpty(result)) {
return uuid;
}
uuid = result.trim();
} catch (Exception e) {
LOGGER.error("fetch uuid error", e);
}
Expand Down
Loading
Loading