directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r635879 - in /directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main: java/org/apache/directory/daemon/installers/bin/ resources/org/apache/directory/daemon/installers/bin/
Date Tue, 11 Mar 2008 10:53:04 GMT
Author: pamarcelot
Date: Tue Mar 11 03:52:46 2008
New Revision: 635879

URL: http://svn.apache.org/viewvc?rev=635879&view=rev
Log:
Improvements to the Binary Installer Command. Better handling of the final name. Changed the
location of the pid files since the apacheds subfolder (situated at /var/run/) is removed
at each boot.

Modified:
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-init
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/createInstaller.sh
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java?rev=635879&r1=635878&r2=635879&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
Tue Mar 11 03:52:46 2008
@@ -49,6 +49,8 @@
     private final Log log;
     /** The sh utility executable */
     private File shUtility = new File( "/bin/sh" );
+    /** The final name of the installer */
+    private String finalName;
 
 
     /**
@@ -187,7 +189,7 @@
             throw new MojoFailureException( "Failed while trying to generate the Bin: " +
e.getMessage() );
         }
 
-        log.info( "Bin Installer generated at " + new File( imagesDirectory, target.getFinalName()
+ ".bin" ) );
+        log.info( "Bin Installer generated at " + new File( imagesDirectory, finalName )
);
     }
 
 
@@ -242,7 +244,12 @@
             filterProperties.put( "app.version", "1.0" );
         }
         filterProperties.put( "tmpArchive", "__tmp.tar.gz" );
-        filterProperties.put( "finalName", target.getFinalName() );
+        finalName = target.getFinalName();
+        if ( !finalName.endsWith( ".bin" ) )
+        {
+            finalName = finalName + ".bin";
+        }
+        filterProperties.put( "finalName", finalName );
         filterProperties.put( "apacheds.version", target.getApplication().getVersion() );
     }
 }

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-init
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-init?rev=635879&r1=635878&r2=635879&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-init
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-init
Tue Mar 11 03:52:46 2008
@@ -46,7 +46,7 @@
 PRIORITY=
 
 # Location of the pid file.
-PIDDIR="/var/run/@app@-@app.version@"
+PIDDIR="/var/run"
 
 # If uncommented, causes the Wrapper to be shutdown using an anchor file.
 #  When launched with the 'start' command, it will also ignore all INT and
@@ -138,8 +138,8 @@
 fi
 
 # Process ID
-ANCHORFILE="$PIDDIR/$INSTANCE.anchor"
-PIDFILE="$PIDDIR/$INSTANCE.pid"
+ANCHORFILE="$PIDDIR/@app@-@app.version@-$INSTANCE.anchor"
+PIDFILE="$PIDDIR/@app@-@app.version@-$INSTANCE.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="$LOCKDIR/$INSTANCE"
 pid=""

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/createInstaller.sh
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/createInstaller.sh?rev=635879&r1=635878&r2=635879&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/createInstaller.sh
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/createInstaller.sh
Tue Mar 11 03:52:46 2008
@@ -3,16 +3,16 @@
 # Copying bootstrap.sh to the installer (and replacing the @lines@ variable)
 lines=`wc -l < bootstrap.sh`
 lines=`expr $lines + 1`
-sed -e "s/@LINES@/${lines}/" bootstrap.sh > ../${finalName}.bin
+sed -e "s/@LINES@/${lines}/" bootstrap.sh > ../${finalName}
 
 # Packing the data and shell scripts
 tar czf ${tmpArchive} root/* sh/*
 
 # Adding the temp archive to the installer
-cat ${tmpArchive} >> ../${finalName}.bin
+cat ${tmpArchive} >> ../${finalName}
 
 # Modifying permission on the installer so it is executable
-chmod 750 ../${finalName}.bin
+chmod 750 ../${finalName}
 
 # Cleaning
 rm ${tmpArchive}

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh?rev=635879&r1=635878&r2=635879&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
Tue Mar 11 03:52:46 2008
@@ -62,10 +62,6 @@
 cp ../root/instance/server.xml $DEFAULT_INSTANCE_HOME_DIRECTORY/conf/
 verifyExitCode
 
-# Creating the directory for the pid files
-mkdir -p /var/run/apacheds-$APACHEDS_VERSION
-verifyExitCode
-
 # Filtering and copying the init.d script
 sed -e "s;@APACHEDS.HOME@;${APACHEDS_HOME_DIRECTORY};" ../root/instance/apacheds-init >
../root/instance/apacheds-init.tmp
 verifyExitCode



Mime
View raw message