hotfix dmidecode 命令前添加 sudo

This commit is contained in:
cheney
2026-05-21 10:58:21 +08:00
parent b6928978de
commit c1f3deb559
3 changed files with 4 additions and 4 deletions
@@ -58,11 +58,11 @@ public class DeviceFingerprintService {
}
private String getCpuModel() {
return executeCommand("dmidecode -t processor | grep \"Version\" | awk -F\\ '{print $2$3$4}'");
return executeCommand("sudo dmidecode -t processor | grep \"Version\" | awk -F\\ '{print $2$3$4}'");
}
private String getCpuSerialNumber() {
return executeCommand("dmidecode -t processor | grep \"Serial Number\" | awk -F\\ '{print $3}'");
return executeCommand("sudo dmidecode -t processor | grep \"Serial Number\" | awk -F\\ '{print $3}'");
}
private String getHardDiskSerialNumber() {