directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r670555 - in /directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg: Prototype postinstall preremove
Date Mon, 23 Jun 2008 13:10:02 GMT
Author: pamarcelot
Date: Mon Jun 23 06:10:01 2008
New Revision: 670555

URL: http://svn.apache.org/viewvc?rev=670555&view=rev
Log:
Added a preremove script and fixed the postinstall script.

Modified:
    directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
    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/preremove

Modified: directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
URL: http://svn.apache.org/viewvc/directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype?rev=670555&r1=670554&r2=670555&view=diff
==============================================================================
--- directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
(original)
+++ directory/daemon/trunk/plugin/src/main/resources/org/apache/directory/daemon/installers/solarispkg/Prototype
Mon Jun 23 06:10:01 2008
@@ -1,5 +1,6 @@
 i pkginfo
 i postinstall
+i preremove
 d none /opt/apacheds-${version} 0755 root root
 d none /opt/apacheds-${version}/bin 0755 root root
 f none /opt/apacheds-${version}/bin/apacheds-tools.jar 0755 root root

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=670555&r1=670554&r2=670555&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 Jun 23 06:10:01 2008
@@ -20,7 +20,8 @@
 chown root:root /etc/init.d/apacheds-${app.version}-default
 
 # Create symbolic links for runlevels for default instance
-#update-rc.d apacheds-${app.version}-default defaults # TODO We have to find how to do it
on Solaris.
+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-${app.version}-default start

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=670555&r1=670554&r2=670555&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 Jun 23 06:10:01 2008
@@ -2,25 +2,25 @@
 set -e
 
 # Emptying some directories
-for instance_dir in `find /var/lib/apacheds-${app.version} -maxdepth 1 -mindepth 1 -type
d`; 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')
+  instance=`echo $instance_dir | sed -e 's/.*apacheds.*\///g'`
   echo Shutting down ApacheDS instance $instance
   /etc/init.d/apacheds-${app.version}-$instance stop
 
   # Remove init script links
-  update-rc.d -f apacheds-${app.version}-$instance remove
+  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')
+  timestamp=`date '+%Y%m%d_%H%M%S'`
   parent_dir=/var/lib
-  tarball=$parent_dir/apacheds-${app.version}-$instance"_"$timestamp.tgz
+  tarball=$parent_dir/apacheds-${app.version}-$instance"_"$timestamp.tar
   echo Backing up old $instance instance data to $tarball
-  tar -zcf $tarball $instance_dir
+  tar cf $tarball $instance_dir
+  gzip -9 $tarball
   rm -rf $instance_dir/partitions/*
   rm -rf $instance_dir/log/*
 done
  
 rm -rf /opt/apacheds-${app.version}/bin/wrapper.log
-
-



Mime
View raw message