mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
hostman: use "uname -m" for for fetch processor type
"uname -p" command from native busybox, coreutils may return "unknown". CentOS coreutils has a patch fallback to using uts.machine if sysinfo syscall is not available Use "uname -m" for maximum compatibility
This commit is contained in:
@@ -95,7 +95,7 @@ func DetectCpuInfo() (*SCPUInfo, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "parse dmi cpuinfo")
|
||||
}
|
||||
cpuArch, err := procutils.NewCommand("uname", "-p").Output()
|
||||
cpuArch, err := procutils.NewCommand("uname", "-m").Output()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "get cpu architecture")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user