[csw-devel] SF.net SVN: gar:[11081] csw/mgar/pkg/apache2/trunk/files/CSWapache2. preinstall

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Wed Sep 29 02:12:20 CEST 2010


Revision: 11081
          http://gar.svn.sourceforge.net/gar/?rev=11081&view=rev
Author:   bdwalton
Date:     2010-09-29 00:12:20 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
apache2: add a preinstall script for CSWapache2 to handle the (potentially) dangling httpd

Added Paths:
-----------
    csw/mgar/pkg/apache2/trunk/files/CSWapache2.preinstall

Added: csw/mgar/pkg/apache2/trunk/files/CSWapache2.preinstall
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/CSWapache2.preinstall	                        (rev 0)
+++ csw/mgar/pkg/apache2/trunk/files/CSWapache2.preinstall	2010-09-29 00:12:20 UTC (rev 11081)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# The old apache2 packages could potentially leave a dangling
+# sbin/httpd file.  As this would prevent successful delivery of the
+# new packages (alternatives won't instantiate sbin/httpd as a symlink
+# since it exists already), we need to kill sbin/httpd if it exists
+# when CSWapache2 is installed.
+
+HTTPD=$PKG_INSTALL_ROOT/opt/csw/apache2/sbin/httpd
+
+if [ -f "$HTTPD" -a ! -L "$HTTPD" ]; then
+   rm -f "$HTTPD"
+fi
+
+exit 0


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list