From 04d93ef0aafcbea363f23d365a33a1ce4efeacd4 Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Mon, 21 Jan 2013 11:56:53 +0100 Subject: [PATCH] Use the user.home property instead of a bash thing. See http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html --- server/src/com/cloud/server/ConfigurationServerImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index 74fba896753..b0abd043371 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -553,8 +553,7 @@ public class ConfigurationServerImpl implements ConfigurationServer { return; } String already = _configDao.getValue("ssh.privatekey"); - String homeDir = null; - homeDir = Script.runSimpleBashScript("echo ~" + username); + String homeDir = System.getProperty("user.home"); if (homeDir == null) { throw new CloudRuntimeException("Cannot get home directory for account: " + username); }