cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: updated refs/heads/master to 5cd3608
Date Thu, 11 Apr 2013 09:31:17 GMT
Updated Branches:
  refs/heads/master a0b5ebccb -> 5cd360852


Remove the chmod solution and replace with an explicit call to
/bin/bash. This way the file will only need read permissions.

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

Branch: refs/heads/master
Commit: 5cd3608529cd630a102345c1b49930e5844ccf4e
Parents: a0b5ebc
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Apr 10 16:50:42 2013 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Apr 11 11:30:45 2013 +0200

----------------------------------------------------------------------
 .../com/cloud/server/ConfigurationServerImpl.java  |   22 +--------------
 1 files changed, 1 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5cd36085/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 53df3b9..596387f 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -148,8 +148,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
     @DB
     public void persistDefaultValues() throws InternalErrorException {
 
-    	fixupScriptFileAttribute();
-
         // Create system user and admin user
         saveUser();
 
@@ -701,24 +699,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
 
     }
 
-	private void fixupScriptFileAttribute() {
-		// TODO : this is a hacking fix to workaround that executable bit is not preserved in WAR
package
-        String scriptPath = Script.findScript("", "scripts/vm/systemvm/injectkeys.sh");
-        if(scriptPath != null) {
-        	File file = new File(scriptPath);
-        	if(!file.canExecute()) {
-        		s_logger.info("Some of the shell script files may not have executable bit set.
Fixup...");
-
-        		String cmd = "sudo chmod ugo+x " + scriptPath;
-        		s_logger.info("Executing " + cmd);
-                String result = Script.runSimpleBashScript(cmd);
-                if (result != null) {
-                    s_logger.warn("Failed to fixup shell script executable bits " + result);
-                }
-        	}
-        }
-	}
-
     private void updateKeyPairsOnDisk(String homeDir) {
         File keyDir = new File(homeDir + "/.ssh");
         Boolean devel = Boolean.valueOf(_configDao.getValue("developer"));
@@ -749,7 +729,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
         if (systemVmIsoPath == null) {
             throw new CloudRuntimeException("Unable to find systemvm iso vms/systemvm.iso");
         }
-        final Script command = new Script(scriptPath, s_logger);
+        final Script command = new Script("/bin/bash " + scriptPath, s_logger);
         command.add(publicKeyPath);
         command.add(privKeyPath);
         command.add(systemVmIsoPath);


Mime
View raw message