Skip to content

Commit

Permalink
feat: 导出机器码
Browse files Browse the repository at this point in the history
导出机器码供其他模块读取

Log: 导出机器码
Task: https://pms.uniontech.com/task-view-174017.html
Influence: 无
Change-Id: Ie825295a6d62c172d9999cf9b023c2249fd248ba
  • Loading branch information
lichangze authored and KT-lcz committed Aug 5, 2022
1 parent 5b34492 commit e2038ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lastore-daemon/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type Manager struct {
autoInstallType system.UpdateType // 保存需要自动安装的类别

UpdateMode system.UpdateType `prop:"access:rw"`
HardwareId string

isUpdateSucceed bool
canRestore bool
Expand Down Expand Up @@ -173,6 +174,12 @@ func NewManager(service *dbusutil.Service, b system.System, c *Config) *Manager
go m.handleOSSignal()
m.updateJobList()
m.modifyUpdateMode()
hardwareId, err := getHardwareId()
if err != nil {
logger.Warning("failed to get HardwareId")
} else {
m.HardwareId = hardwareId
}
return m
}

Expand Down

0 comments on commit e2038ba

Please sign in to comment.