Commit f0bbd4c1 authored by szh's avatar szh

添加系统arch的判断

parent 61060654
......@@ -32,6 +32,7 @@ type Pai struct {
NetInfo *types.NodeNetInfo `json:"net_info"`
BtyVersion *types.VersionInfo `json:"bty_version"`
Err string `json:"err"`
Arch string `json:"arch"`
}
type ReqUpdatePai struct {
......@@ -43,6 +44,16 @@ func (p *Pai) SetPai() error {
p.GetConfig()
p.GetDevstatus()
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
}
......
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