[ Agent ] [ App ] - offline build nfs client - 2

This commit is contained in:
zeaslity
2023-12-15 11:33:27 +08:00
parent 4c7a9aec7b
commit ed9e28b1c2
2 changed files with 16 additions and 47 deletions

View File

@@ -782,12 +782,7 @@ func (op *AgentOsOperator) installDockerOfflineExec(args []string) (bool, []stri
"/root/install",
})
AllCommandExecutor([]string{
"chmod",
"777",
"-R",
"/root/install/docker/*",
})
HardCodeCommandExecutor("chmod 777 -R /root/install/docker/*")
resultOk, l := HardCodeCommandExecutor("mv /root/install/docker/* /usr/bin")
if !resultOk {
@@ -2052,33 +2047,13 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) {
}
}
ok, resultLog := AllCompleteExecutor([][]string{
{
"rm",
"-rf",
"/root/.oh-my-zsh",
},
{
"rm",
"-rf",
"/root/wdd/zsh-install.sh",
},
{
"rm",
"-rf",
"/root/wdd/oh-my-zsh-plugins-list.txt",
},
{
"mkdir",
"-p",
"/root/wdd/",
},
append(
op.InstallCommandPrefix,
"zsh",
"git",
),
})
BasicRemoveFolderComplete("/root/.oh-my-zsh")
BasicRemoveFolderComplete("/root/wdd/zsh-install.sh")
BasicRemoveFolderComplete("/root/wdd/oh-my-zsh-plugins-list.txt")
BasicCreateFolder("/root/wdd/")
ok, resultLog := AllCommandExecutor(
append(op.InstallCommandPrefix, "zsh", "git"))
if !ok {
return false, resultLog
}
@@ -2091,14 +2066,8 @@ func (op *AgentOsOperator) installZSHExec() (bool, []string) {
zshRemoteGitUrl = "https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh"
}
log.InfoF("开始下载zsh的安装脚本 => %s", zshRemoteGitUrl)
resultOk, l := AllCommandExecutor([]string{
"wget",
"--timeout=5",
zshRemoteGitUrl,
"-qO",
"/root/wdd/zsh-install.sh",
},
)
resultOk, l := BasicDownloadFile(zshRemoteGitUrl, "/root/wdd/zsh-install.sh")
if !resultOk {
l = append(l, "zsh-install.sh 下载失败! 安装终止")
return false, l
@@ -2218,6 +2187,6 @@ func (op *AgentOsOperator) ok(funcArgs []string) [][]string {
}
func (op *AgentOsOperator) okExec(funcArgs []string) (bool, []string) {
log.WarnF("call empty base func ! func args are => %#v", funcArgs)
log.WarnF("[okExec] - call empty base func ! func args are => %#v ", funcArgs)
return true, nil
}