Commit f0bbd4c1 authored by szh's avatar szh

添加系统arch的判断

parent 61060654
...@@ -32,6 +32,7 @@ type Pai struct { ...@@ -32,6 +32,7 @@ type Pai struct {
NetInfo *types.NodeNetInfo `json:"net_info"` NetInfo *types.NodeNetInfo `json:"net_info"`
BtyVersion *types.VersionInfo `json:"bty_version"` BtyVersion *types.VersionInfo `json:"bty_version"`
Err string `json:"err"` Err string `json:"err"`
Arch string `json:"arch"`
} }
type ReqUpdatePai struct { type ReqUpdatePai struct {
...@@ -43,6 +44,16 @@ func (p *Pai) SetPai() error { ...@@ -43,6 +44,16 @@ func (p *Pai) SetPai() error {
p.GetConfig() p.GetConfig()
p.GetDevstatus() p.GetDevstatus()
p.GetBtyVersion() p.GetBtyVersion()
p.SetPaiEnv()
return nil
}
func (p *Pai) SetPaiEnv() error {
var buf bytes.Buffer
cmd := exec.Command("arch")
cmd.Stdout = &buf
cmd.Run()
p.Arch = buf.String()
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment