You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/07/29 14:54:31 UTC

svn commit: r1366839 - /karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java

Author: jbonofre
Date: Sun Jul 29 12:54:31 2012
New Revision: 1366839

URL: http://svn.apache.org/viewvc?rev=1366839&view=rev
Log:
[KARAF-1683] Fixing wrapper resource file provisioning

Modified:
    karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java

Modified: karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java?rev=1366839&r1=1366838&r2=1366839&view=diff
==============================================================================
--- karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java (original)
+++ karaf/branches/karaf-2.2.x/shell/wrapper/src/main/java/org/apache/karaf/shell/wrapper/InstallCommand.java Sun Jul 29 12:54:31 2012
@@ -81,10 +81,9 @@ public class InstallCommand extends Abst
                     copyResourceTo(new File(bin, name + "-wrapper.exe"), "windows64/karaf-wrapper.exe", false);
 
                     serviceFile = new File(bin, name + "-service.bat");
-
                     wrapperConf = new File(etc, name + "-wrapper.conf");
-                    copyFilteredResourceTo(wrapperConf, "windows64/karaf-wrapper.conf", props);
 
+                    copyFilteredResourceTo(wrapperConf, "windows64/karaf-wrapper.conf", props);
                     copyFilteredResourceTo(serviceFile, "windows64/karaf-service.bat", props);
 
                     mkdir(lib);
@@ -95,10 +94,9 @@ public class InstallCommand extends Abst
                     copyResourceTo(new File(bin, name + "-wrapper.exe"), "windows/karaf-wrapper.exe", false);
 
                     serviceFile = new File(bin, name + "-service.bat");
-
                     wrapperConf = new File(etc, name + "-wrapper.conf");
-                    copyFilteredResourceTo(wrapperConf, "windows/karaf-wrapper.conf", props);
 
+                    copyFilteredResourceTo(wrapperConf, "windows/karaf-wrapper.conf", props);
                     copyFilteredResourceTo(serviceFile, "windows/karaf-service.bat", props);
 
                     mkdir(lib);
@@ -172,8 +170,8 @@ public class InstallCommand extends Abst
                     chmod(file, "a+x");
 
                     serviceFile = new File(bin, name + "-service");
-                    copyResourceTo(file, "unix/karaf-service", false);
-                    chmod(file, "a+x");
+                    copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                    chmod(serviceFile, "a+x");
 
                     wrapperConf = new File(etc, name + "-wrapper.conf");
                     copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);
@@ -188,8 +186,8 @@ public class InstallCommand extends Abst
                     chmod(file, "a+x");
 
                     serviceFile = new File(bin, name + "-service");
-                    copyResourceTo(file, "unix/karaf-service", false);
-                    chmod(file, "a+x");
+                    copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                    chmod(serviceFile, "a+x");
 
                     wrapperConf = new File(etc, name + "-wrapper.conf");
                     copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);
@@ -207,8 +205,8 @@ public class InstallCommand extends Abst
                     chmod(file, "a+x");
 
                     serviceFile = new File(bin, name + "-service");
-                    copyResourceTo(file, "unix/karaf-service", false);
-                    chmod(file, "a+x");
+                    copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                    chmod(serviceFile, "a+x");
 
                     wrapperConf = new File(etc, name + "-wrapper.conf");
                     copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);
@@ -223,8 +221,8 @@ public class InstallCommand extends Abst
                     chmod(file, "a+x");
 
                     serviceFile = new File(bin, name + "-service");
-                    copyResourceTo(file, "unix/karaf-service", false);
-                    chmod(file, "a+x");
+                    copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                    chmod(serviceFile, "a+x");
 
                     wrapperConf = new File(etc, name + "-wrapper.conf");
                     copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);
@@ -239,8 +237,8 @@ public class InstallCommand extends Abst
                     chmod(file, "a+x");
 
                     serviceFile = new File(bin, name + "-service");
-                    copyResourceTo(file, "unix/karaf-service", false);
-                    chmod(file, "a+x");
+                    copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                    chmod(serviceFile, "a+x");
 
                     wrapperConf = new File(etc, name + "-wrapper.conf");
                     copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);
@@ -256,8 +254,8 @@ public class InstallCommand extends Abst
                 chmod(file, "a+x");
 
                 serviceFile = new File(bin, name + "-service");
-                copyResourceTo(file, "unix/karaf-service", false);
-                chmod(file, "a+x");
+                copyFilteredResourceTo(serviceFile, "unix/karaf-service", props);
+                chmod(serviceFile, "a+x");
 
                 wrapperConf = new File(etc, name + "-wrapper.conf");
                 copyFilteredResourceTo(wrapperConf, "unix/karaf-wrapper.conf", props);