远程安装时使用uname取代/usr/bin/uname命令

This commit is contained in:
GoEdgeLab
2022-12-28 19:01:09 +08:00
parent fba03b43ba
commit 6f48ee3dec

View File

@@ -150,7 +150,8 @@ func (this *BaseInstaller) InstallHelper(targetDir string, role nodeconfigs.Node
var unameRetries = 3
var uname string
for i := 0; i < unameRetries; i++ {
uname, _, err = this.client.Exec("/usr/bin/uname -a")
// 此处不能使用 /usr/bin/uname因为uname不一定在 /usr/bin 下
uname, _, err = this.client.Exec("uname -a")
if len(uname) == 0 {
continue
}