Use the user.home property instead of a bash thing. See

http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
This commit is contained in:
Hugo Trippaers 2013-01-21 11:56:53 +01:00
parent a65b584d18
commit 04d93ef0aa
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}