From 4c30636c226f9ca92be8bfeffdbf2b8c98930ed5 Mon Sep 17 00:00:00 2001 From: cloudtrends <2306434383@qq.com> Date: Wed, 14 Jan 2015 19:51:18 +0800 Subject: [PATCH] under windows the publicKeyPath and privateKeyPath should replace from \ to / when send them into injectkeys.py Signed-off-by: Rajani Karuturi This closes #66 --- server/src/com/cloud/server/ConfigurationServerImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index 306c0e7bf0f..dec2e7c7ce3 100644 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -894,6 +894,13 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } else { command = new Script("/bin/bash", s_logger); } + String osname = System.getProperty("os.name"); + if (osname.startsWith("Windows")) { + scriptPath = scriptPath.replaceAll("\\\\" ,"/" ); + systemVmIsoPath = systemVmIsoPath.replaceAll("\\\\" ,"/" ); + publicKeyPath = publicKeyPath.replaceAll("\\\\" ,"/" ); + privKeyPath = privKeyPath.replaceAll("\\\\" ,"/" ); + } command.add(scriptPath); command.add(publicKeyPath); command.add(privKeyPath);