directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r693128 - in /directory/daemon/trunk/plugin/src/main: java/org/apache/directory/daemon/installers/solarispkg/ resources/org/apache/directory/daemon/installers/solarispkg/
Date Mon, 08 Sep 2008 15:11:13 GMT
Author: pamarcelot
Date: Mon Sep  8 08:11:12 2008
New Revision: 693128

URL: http://svn.apache.org/viewvc?rev=693128&view=rev
Log:
Rollback of commit 693110. I did not get the comment of the jira reporter well, I need to
start over the improvement.

Modified:
    directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-default.conf
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-init
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postinstall
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postremove
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/preremove

Modified: directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
(original)
+++ directory/daemon/trunk/plugin/src/main/java/org/apache/directory/daemon/installers/solarispkg/SolarisPkgInstallerCommand.java
Mon Sep  8 08:11:12 2008
@@ -127,8 +127,8 @@
         File pkgRootDirectory = new File( pkgDirectory, "root" );
         pkgRootDirectory.mkdirs();
 
-        // Copying the apacheds files in the '/var/opt/apacheds/' directory
-        File apacheDsHomeDirectory = new File( pkgRootDirectory, "var/opt/apacheds" );
+        // Copying the apacheds files in the '/opt/apacheds-$VERSION/' directory
+        File apacheDsHomeDirectory = new File( pkgRootDirectory, "opt/apacheds-" + target.getApplication().getVersion()
);
         try
         {
             // Copying the generated layout
@@ -145,8 +145,9 @@
                 + ") to the PKG directory (" + apacheDsHomeDirectory + ")" );
         }
 
-        // Copying the default instance files in the '/var/opt/apacheds/instances/default'
directory
-        File defaultInstanceDirectory = new File( apacheDsHomeDirectory, "instances/default"
);
+        // Copying the instances in the '/var/lib/apacheds-$VERSION/default' directory
+        File defaultInstanceDirectory = new File( pkgRootDirectory, "var/lib/apacheds-"
+            + target.getApplication().getVersion() + "/default" );
         defaultInstanceDirectory.mkdirs();
         File debDefaultInstanceConfDirectory = new File( defaultInstanceDirectory, "conf"
);
         debDefaultInstanceConfDirectory.mkdirs();
@@ -156,7 +157,7 @@
         new File( defaultInstanceDirectory, "run" ).mkdirs();
         File etcInitdDirectory = new File( pkgRootDirectory, "etc/init.d" );
         etcInitdDirectory.mkdirs();
-        new File( pkgRootDirectory, "/var/run/apacheds" ).mkdirs();
+        new File( pkgRootDirectory, "/var/run/apacheds-" + target.getApplication().getVersion()
).mkdirs();
         try
         {
             // Copying the apacheds.conf file in the default instance conf directory
@@ -174,7 +175,7 @@
 
             // Copying the init script in /etc/init.d/
             MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"apacheds-init" ),
-                new File( etcInitdDirectory, "apacheds-default" ), true );
+                new File( etcInitdDirectory, "apacheds-" + target.getApplication().getVersion()
+ "-default" ), true );
 
             // Removing the redundant server.xml file (see DIRSERVER-1112)
             new File( apacheDsHomeDirectory, "conf/server.xml" ).delete();

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-default.conf
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-default.conf?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-default.conf
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-default.conf
Mon Sep  8 08:11:12 2008
@@ -20,7 +20,7 @@
 #
 # In this file you can override parameters specified in the default
 # Apache Directory Server config file which is usually at
-# /var/opt/apacheds/conf/apacheds.conf
+# /opt/apacheds-x.x.x/conf/apacheds.conf
 #
 # See also http://wrapper.tanukisoftware.org/doc/english/properties.html
 # For a list of properties that can be set.

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-init
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-init?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-init
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/apacheds-init
Mon Sep  8 08:11:12 2008
@@ -27,8 +27,8 @@
 #
 
 # Variables
-INSTANCE_HOME=/var/opt/@app@/instances
-APACHEDS_HOME=/var/opt/@app@
+INSTANCE_HOME=/var/lib/@app@-@app.version@
+APACHEDS_HOME=/opt/@app@-@app.version@
 INSTANCE=default
 
 # Application
@@ -46,7 +46,7 @@
 PRIORITY=
 
 # Location of the pid file.
-PIDDIR="/var/run/@app@"
+PIDDIR="/var/run/@app@-@app.version@"
 
 # 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
@@ -137,7 +137,7 @@
 fi
 
 # Process ID
-ANCHORFILE="$PIDDIR/@app@-$INSTANCE.anchor"
+ANCHORFILE="$PIDDIR/@app@-@app.version@-$INSTANCE.anchor"
 PIDFILE="$PIDDIR/$INSTANCE.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="$LOCKDIR/$INSTANCE"

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postinstall
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postinstall?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postinstall
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postinstall
Mon Sep  8 08:11:12 2008
@@ -20,8 +20,8 @@
 set -e
 
 # Setting executable permissions
-chmod +x /var/opt/apacheds/bin/apacheds
-chmod +x /etc/init.d/apacheds-default
+chmod +x /opt/apacheds-${app.version}/bin/apacheds
+chmod +x /etc/init.d/apacheds-${app.version}-default
 
 # Creating the apacheds user (only if needed)
 USER=`eval "id -u -n apacheds 2>/dev/null || :"`
@@ -32,14 +32,15 @@
 fi
 
 # Modifying owner
-chown -R apacheds:apacheds /var/opt/apacheds
-chown apacheds:apacheds /var/run/apacheds
-chown root:root /etc/init.d/apacheds-default
+chown -R apacheds:apacheds /opt/apacheds-${app.version}
+chown -R apacheds:apacheds /var/lib/apacheds-${app.version}
+chown apacheds:apacheds /var/run/apacheds-${app.version}
+chown root:root /etc/init.d/apacheds-${app.version}-default
 
 # Create symbolic links for runlevels for default instance
-ln -s /etc/init.d/apacheds-${app.version}-default /etc/rc0.d/K99apacheds-default
-ln -s /etc/init.d/apacheds-${app.version}-default /etc/rc3.d/S99apacheds-default
+ln -s /etc/init.d/apacheds-${app.version}-default /etc/rc0.d/K99apacheds-${app.version}-default
+ln -s /etc/init.d/apacheds-${app.version}-default /etc/rc3.d/S99apacheds-${app.version}-default
 
 # Start the default instance 
-/etc/init.d/apacheds-default start
+/etc/init.d/apacheds-${app.version}-default start
 

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postremove
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postremove?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postremove
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/postremove
Mon Sep  8 08:11:12 2008
@@ -20,4 +20,4 @@
 set -e
 
 # Cleaning
-rm -rf /var/opt/apacheds
+rm -rf /opt/apacheds-${app.version}

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/preremove
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/preremove?rev=693128&r1=693127&r2=693128&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/preremove
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/preremove
Mon Sep  8 08:11:12 2008
@@ -20,15 +20,19 @@
 set -e
 
 # Emptying some directories
-for instance_dir in `ls -d /var/opt/apacheds/instances/*`; do
+for instance_dir in `ls -d /var/lib/apacheds-${app.version}/*`; do
   # Get instance and use it to shutdown
   instance=`echo $instance_dir | sed -e 's/.*apacheds.*\///g'`
   echo Shutting down ApacheDS instance $instance
-  /etc/init.d/apacheds-$instance stop
+  /etc/init.d/apacheds-${app.version}-$instance stop
+
+  # Remove init script links
+  rm /etc/rc0.d/K99apacheds-${app.version}-default
+  rm /etc/rc3.d/S99apacheds-${app.version}-default
 
   # Backup old instance folders before deleting them
   timestamp=`date '+%Y%m%d_%H%M%S'`
-  parent_dir=/var/opt
+  parent_dir=/var/lib
   tarball=$parent_dir/apacheds-${app.version}-$instance"_"$timestamp.tar
   echo Backing up old $instance instance data to $tarball
   tar cf $tarball $instance_dir
@@ -36,9 +40,5 @@
   rm -rf $instance_dir/partitions/*
   rm -rf $instance_dir/log/*
 done
-
-# Remove init script links
-rm /etc/rc0.d/K99apacheds-default
-rm /etc/rc3.d/S99apacheds-default
  
-rm -rf /var/opt/apacheds/bin/wrapper.log
+rm -rf /opt/apacheds-${app.version}/bin/wrapper.log



Mime
View raw message