SF.net SVN: gar:[25406] csw/mgar/pkg/php5/branches/php-5.6.x/files/ CSWap24-modphp5.postinstall

cgrzemba at users.sourceforge.net cgrzemba at users.sourceforge.net
Tue Nov 24 16:53:03 CET 2015


Revision: 25406
          http://sourceforge.net/p/gar/code/25406
Author:   cgrzemba
Date:     2015-11-24 15:53:03 +0000 (Tue, 24 Nov 2015)
Log Message:
-----------
php5/branches/php-5.6.x: make postinstall more tough

Modified Paths:
--------------
    csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall

Modified: csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall
===================================================================
--- csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall	2015-11-24 14:27:43 UTC (rev 25405)
+++ csw/mgar/pkg/php5/branches/php-5.6.x/files/CSWap24-modphp5.postinstall	2015-11-24 15:53:03 UTC (rev 25406)
@@ -1,23 +1,25 @@
-#!/bin/sh
-
 CSW_PREFIX=${PKG_INSTALL_ROOT}/etc/opt/csw
 AP2_CONFIG=$CSW_PREFIX/apache2/httpd.conf
 AP2_MODULE=$CSW_PREFIX/apache2/extra/modules.load
 
-# Configure mod_php5 in httpd.conf
-if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ]
-then
-    echo "Existing mod_php5 configuration detected"
+Configure mod_php5 in httpd.conf
+if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ] ; then
+     echo "Existing mod_php5 configuration detected"
 elif [ -n "`egrep '#Include extra/httpd-php5.conf' $AP2_CONFIG`" ]; then
-    echo "Re-enabling existing config"
-    perl -i -plne 's,^#(Include extra/httpd-php5.conf),$1,' $AP2_CONFIG
-    perl -i -plne 's,^#(LoadModule php5.*),$1,' $AP2_MODULE
+     echo "Re-enabling existing config"
+     perl -i -plne 's,^#(Include extra/httpd-php5.conf),$1,' $AP2_CONFIG
 else
-    echo "Adding Include for extra/http-php5.conf to httpd.conf"
-    cat << END >> $AP2_CONFIG
-
+     echo "Adding Include for extra/http-php5.conf to httpd.conf"
+     cat << END >> $AP2_CONFIG
+ 
 Include extra/httpd-php5.conf
 END
+fi
+
+if [ -n "`egrep 'LoadModule php5_module' $AP2_MODULE`" ] ; then
+    perl -i -plne 's,^#(LoadModule php5.*),$1,' $AP2_MODULE
+else
+    echo "Adding LoadModule php5_module for extra/modules.load"
     cat << END >> $AP2_MODULE
 LoadModule php5_module lib/apache2/modules/libphp5.so
 END

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