mirror of
https://github.com/kemko/xc.git
synced 2026-01-01 15:55:43 +03:00
ssh command configurable
This commit is contained in:
@@ -60,7 +60,7 @@ func createSSHCmd(host string, argv string) *exec.Cmd {
|
||||
params = append(params, "-c", argv)
|
||||
}
|
||||
log.Debugf("Created command ssh %v", params)
|
||||
return exec.Command("ssh", params...)
|
||||
return exec.Command(sshCommand, params...)
|
||||
}
|
||||
|
||||
func getInterpreter() []string {
|
||||
|
||||
@@ -25,6 +25,7 @@ var (
|
||||
poolLock *sync.Mutex
|
||||
poolSize int
|
||||
remoteEnvironment map[string]string
|
||||
sshCommand string
|
||||
|
||||
noneInterpreter string
|
||||
suInterpreter string
|
||||
@@ -39,6 +40,11 @@ func Initialize(numThreads int, username string) {
|
||||
SetRaise(RTNone)
|
||||
}
|
||||
|
||||
// SetSSHCommand sets ssh binary path to be used in createSSHCommand
|
||||
func SetSSHCommand(command string) {
|
||||
sshCommand = command
|
||||
}
|
||||
|
||||
// SetInterpreter sets none-raise interpreter
|
||||
func SetInterpreter(interpreter string) {
|
||||
noneInterpreter = interpreter
|
||||
|
||||
Reference in New Issue
Block a user