[Agent] [Executor] 优化Functional Executor
This commit is contained in:
@@ -203,9 +203,19 @@ func (op *AgentOsOperator) shutdownFirewall() [][]string {
|
||||
|
||||
func (op *AgentOsOperator) shutdownFirewallExec() (bool, []string) {
|
||||
|
||||
// quick sort
|
||||
shutdownFunc := [][]string{
|
||||
{"systemctl", "stop", "firewalld"},
|
||||
{"systemctl", "disable", "firewalld"},
|
||||
{"systemctl", "stop", "ufw"},
|
||||
{"systemctl", "disable", "ufw"},
|
||||
{"iptables", "-F"},
|
||||
}
|
||||
// 忽略错误
|
||||
_, resultLog := AllCompleteExecutor(shutdownFunc)
|
||||
|
||||
return false, nil
|
||||
// centos
|
||||
|
||||
return true, resultLog
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) modifyHostname(args []string) [][]string {
|
||||
@@ -265,7 +275,11 @@ func (op *AgentOsOperator) disableSwap() [][]string {
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) disableSwapExec() (bool, []string) {
|
||||
return false, nil
|
||||
|
||||
resultOK := true
|
||||
var resultLog []string
|
||||
|
||||
return resultOK, resultLog
|
||||
}
|
||||
|
||||
func (op *AgentOsOperator) removeDocker() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user