You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/02/25 06:31:11 UTC

[1/2] git commit: refs/heads/master - db: Fix deploydb, make sure scripts are in path

db: Fix deploydb, make sure scripts are in path

Signed-off-by: Rohit Yadav <bh...@apache.org>


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

Branch: refs/heads/master
Commit: a32c6d5c9d50320b2526bc9e8a6820dd1e0987f0
Parents: 357b4e6
Author: Rohit Yadav <bh...@apache.org>
Authored: Mon Feb 25 10:58:48 2013 +0530
Committer: Rohit Yadav <bh...@apache.org>
Committed: Mon Feb 25 11:00:56 2013 +0530

----------------------------------------------------------------------
 developer/pom.xml                            |    4 ++++
 utils/src/com/cloud/utils/script/Script.java |    6 ++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a32c6d5c/developer/pom.xml
----------------------------------------------------------------------
diff --git a/developer/pom.xml b/developer/pom.xml
index a20200f..ff47b14 100644
--- a/developer/pom.xml
+++ b/developer/pom.xml
@@ -183,6 +183,10 @@
                   <key>catalina.home</key>
                   <value>${project.parent.basedir}/utils</value>
                 </systemProperty>
+                <systemProperty>
+                  <key>paths.script</key>
+                  <value>${basedir}/target/db</value>
+                </systemProperty>
               </systemProperties>
             </configuration>
           </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a32c6d5c/utils/src/com/cloud/utils/script/Script.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/script/Script.java b/utils/src/com/cloud/utils/script/Script.java
index 1e5aab4..cb25844 100755
--- a/utils/src/com/cloud/utils/script/Script.java
+++ b/utils/src/com/cloud/utils/script/Script.java
@@ -449,6 +449,12 @@ public class Script implements Callable<String> {
             }
 
         }
+
+        file = new File(System.getProperty("paths.script") + File.separator + path + File.separator + script);
+        if (file.exists()) {
+            return file.getAbsolutePath();
+        }
+
         s_logger.warn("Unable to find script " + script);
         return null;
     }