X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.simple%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Flib%2Flinux%2FRedhatHostManager.java;h=a59b6645fccf81d93658b31668dc54515753663c;hb=11e6f6d17d279a671f0d51d4db8d828e2e8aaf72;hp=a583921936aea780deb931c3cc8b4992e2350f02;hpb=1fdb1b4e7b1d2b0cabb6483238301b857a6392fa;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatHostManager.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatHostManager.java index a58392193..a59b6645f 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatHostManager.java +++ b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatHostManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.argeo.slc.lib.linux; import org.argeo.slc.SlcException; @@ -62,9 +61,14 @@ public class RedhatHostManager { } protected void executeCommand(String command) { - if (useSsh) - new RemoteExec(getSshTarget(), command).run(); - else + if (command == null) + return; + + if (useSsh) { + RemoteExec rExec = new RemoteExec(getSshTarget(), command); + rExec.setFailOnBadExitStatus(false); + rExec.run(); + } else new SystemCall(command).run(); }