Skip to content

Commit 1149b59

Browse files
committed
Update properties.go
1 parent 34c1774 commit 1149b59

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wap/pkg/wifi/properties.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ func GetClusterInfo() (GetClusterInfoResponse, error) {
317317
}
318318

319319
func GetHardwareID() (string, error) {
320+
if envID := os.Getenv("HARDWARE_ID"); envID != "" {
321+
return envID, nil
322+
}
320323
cmd := "(cat /proc/cpuinfo | grep -i 'Serial' && cat /proc/cpuinfo | grep -i 'Hardware' && cat /proc/cpuinfo | grep -i 'Revision') | sha256sum | awk '{print $1}'"
321324
out, err := exec.Command("sh", "-c", cmd).Output()
322325
if err != nil {

0 commit comments

Comments
 (0)