hotfix dmidecode 命令前添加 sudo
This commit is contained in:
parent
b6928978de
commit
c1f3deb559
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.sunyard.cisd</groupId>
|
<groupId>com.sunyard.cisd</groupId>
|
||||||
<artifactId>device-fingerprint-tool</artifactId>
|
<artifactId>device-fingerprint-tool</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.0.2</version>
|
||||||
<name>device-fingerprint-tool</name>
|
<name>device-fingerprint-tool</name>
|
||||||
<description>设备指纹信息获取工具</description>
|
<description>设备指纹信息获取工具</description>
|
||||||
|
|
||||||
|
|||||||
@ -58,11 +58,11 @@ public class DeviceFingerprintService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getCpuModel() {
|
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() {
|
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() {
|
private String getHardDiskSerialNumber() {
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -128,7 +128,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sunyard.cisd</groupId>
|
<groupId>com.sunyard.cisd</groupId>
|
||||||
<artifactId>device-fingerprint-tool</artifactId>
|
<artifactId>device-fingerprint-tool</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.0.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user