mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Merge remote-tracking branch 'apache/4.19'
This commit is contained in:
commit
1144f5258d
@ -661,8 +661,8 @@ public class Script implements Callable<String> {
|
||||
return executable;
|
||||
}
|
||||
|
||||
private static Script getScriptForCommandRun(String... command) {
|
||||
Script s = new Script(command[0], 0);
|
||||
private static Script getScriptForCommandRun(long timeout, String... command) {
|
||||
Script s = new Script(command[0], timeout);
|
||||
if (command.length > 1) {
|
||||
for (int i = 1; i < command.length; ++i) {
|
||||
s.add(command[i]);
|
||||
@ -671,12 +671,16 @@ public class Script implements Callable<String> {
|
||||
return s;
|
||||
}
|
||||
|
||||
private static Script getScriptForCommandRun(String... command) {
|
||||
return getScriptForCommandRun(0, command);
|
||||
}
|
||||
|
||||
public static String executeCommand(String... command) {
|
||||
return runScript(getScriptForCommandRun(command));
|
||||
}
|
||||
|
||||
public static int executeCommandForExitValue(long timeout, String... command) {
|
||||
return runScriptForExitValue(getScriptForCommandRun(command));
|
||||
return runScriptForExitValue(getScriptForCommandRun(timeout, command));
|
||||
}
|
||||
|
||||
public static int executeCommandForExitValue(String... command) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user