cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/master to abc0b40
Date Fri, 25 Jul 2014 23:56:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master a21604619 -> abc0b40ac


CLOUDSTACK-7124: Fix semicolon caused VPN programming issue on Xen


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/abc0b40a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/abc0b40a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/abc0b40a

Branch: refs/heads/master
Commit: abc0b40acb5d1b5b87362b4737605249525455dc
Parents: a216046
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Fri Jul 25 16:17:30 2014 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Fri Jul 25 16:56:35 2014 -0700

----------------------------------------------------------------------
 .../hypervisor/xenserver/resource/CitrixResourceBase.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abc0b40a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index e961250..4fa0456 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -562,9 +562,12 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
     @Override
     public ExecutionResult executeInVR(String routerIP, String script, String args, int timeout)
{
         Pair<Boolean, String> result;
+        String cmdline = "/opt/cloud/bin/router_proxy.sh " + script + " " + routerIP + "
" + args;
+        // semicolon need to be escape for bash
+        cmdline = cmdline.replaceAll(";", "\\\\;");
         try {
-            s_logger.debug("Executing command in VR:  /opt/cloud/bin/router_proxy.sh " +
script + " " + routerIP + " " + args);
-            result = SshHelper.sshExecute(_host.ip, 22, _username, null, _password.peek(),
"/opt/cloud/bin/router_proxy.sh " + script + " " + routerIP + " " + args,
+            s_logger.debug("Executing command in VR: " + cmdline);
+            result = SshHelper.sshExecute(_host.ip, 22, _username, null, _password.peek(),
cmdline,
                     60000, 60000, timeout * 1000);
         } catch (Exception e) {
             return new ExecutionResult(false, e.getMessage());


Mime
View raw message