[Pkg-php-commits] r882 - php5/branches/rg-extension-manager/debian
Raphael Geissert
atomo64-guest at alioth.debian.org
Thu Sep 20 00:45:45 UTC 2007
Author: atomo64-guest
Date: 2007-09-20 00:45:45 +0000 (Thu, 20 Sep 2007)
New Revision: 882
Modified:
php5/branches/rg-extension-manager/debian/libapache2-mod-php5.postinst
php5/branches/rg-extension-manager/debian/php5-cgi.postinst
php5/branches/rg-extension-manager/debian/php5-cli.postinst
php5/branches/rg-extension-manager/debian/php5-module.postinst
php5/branches/rg-extension-manager/debian/php5disext
php5/branches/rg-extension-manager/debian/php5enext
Log:
Fixed some bugs
Modified: php5/branches/rg-extension-manager/debian/libapache2-mod-php5.postinst
===================================================================
--- php5/branches/rg-extension-manager/debian/libapache2-mod-php5.postinst 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/libapache2-mod-php5.postinst 2007-09-20 00:45:45 UTC (rev 882)
@@ -37,9 +37,6 @@
unlink "/etc/php5/${SAPI}/conf.d"
mkdir "/etc/php5/${SAPI}/conf.d/"
chmod a+xr,u+w "/etc/php5/${SAPI}/conf.d/"
- for i in /etc/php5/conf.d/*; do
- ln -s "$i" "/etc/php5/${SAPI}/conf.d/"
- done
fi
# END of upgrade code
Modified: php5/branches/rg-extension-manager/debian/php5-cgi.postinst
===================================================================
--- php5/branches/rg-extension-manager/debian/php5-cgi.postinst 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/php5-cgi.postinst 2007-09-20 00:45:45 UTC (rev 882)
@@ -36,9 +36,6 @@
unlink "/etc/php5/${SAPI}/conf.d"
mkdir "/etc/php5/${SAPI}/conf.d/"
chmod a+xr,u+w "/etc/php5/${SAPI}/conf.d/"
- for i in /etc/php5/conf.d/*; do
- ln -s "$i" "/etc/php5/${SAPI}/conf.d/"
- done
fi
# END of upgrade code
Modified: php5/branches/rg-extension-manager/debian/php5-cli.postinst
===================================================================
--- php5/branches/rg-extension-manager/debian/php5-cli.postinst 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/php5-cli.postinst 2007-09-20 00:45:45 UTC (rev 882)
@@ -36,9 +36,6 @@
unlink "/etc/php5/${SAPI}/conf.d"
mkdir "/etc/php5/${SAPI}/conf.d/"
chmod a+xr,u+w "/etc/php5/${SAPI}/conf.d/"
- for i in /etc/php5/conf.d/*; do
- ln -s "$i" "/etc/php5/${SAPI}/conf.d/"
- done
fi
# END of upgrade code
Modified: php5/branches/rg-extension-manager/debian/php5-module.postinst
===================================================================
--- php5/branches/rg-extension-manager/debian/php5-module.postinst 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/php5-module.postinst 2007-09-20 00:45:45 UTC (rev 882)
@@ -22,6 +22,11 @@
done
fi
+# Enable extension on all SAPIs if @dsoname@
+if [ -x /usr/sbin/php5enext ]; then
+ /usr/sbin/php5enext all "@dsoname@" quiet nonfatal
+fi
+
#EXTRA#
#DEBHELPER#
Modified: php5/branches/rg-extension-manager/debian/php5disext
===================================================================
--- php5/branches/rg-extension-manager/debian/php5disext 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/php5disext 2007-09-20 00:45:45 UTC (rev 882)
@@ -7,6 +7,7 @@
PHPDIR="/etc/php5"
QUIET=0
FATAL=1
+MISSING_SAPI_IS_ERROR=1
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: php5disext SAPIS EXTENSION [verbose|quiet] [fatal|nonfatal]"
@@ -46,24 +47,35 @@
fi
EXT="$2"
-EXT_SO="$EXT.so"
SAPIS="$1"
if [ "$SAPIS" = "all" ]; then
SAPIS="apache2 cli cgi"
+ MISSING_SAPI_IS_ERROR=0
fi
for SAPI in $SAPIS; do
+ if [ ! -e "$PHPDIR/$SAPI" ]; then
+ if [ $MISSING_SAPI_IS_ERROR -eq 1 ]; then
+ if [ ! $QUIET -eq 1 ]; then
+ echo "The $SAPI SAPI doesn't seem to be installed!"
+ fi
+ exit 4
+ else
+ continue
+ fi
+ fi
+
# check for still-not-directory $SAPI/conf.d
- if [ ! -d "$PHPDIR/$SAPI/conf.d"]; then
- if [ ! $QUIET -eq 1 ];then
- echo "$PHPDIR/$SAPI/conf.d is not a directory!" > &2
+ if [ ! -d "$PHPDIR/$SAPI/conf.d" ]; then
+ if [ ! $QUIET -eq 1 ]; then
+ echo "$PHPDIR/$SAPI/conf.d is not a directory!"
fi
exit 3
fi
- if [ ! -L "$PHPDIR/$SAPI/conf.d/$EXT_SO" ]; then
- if [ ! $QUIET -eq 1 ];then
+ if [ ! -L "$PHPDIR/$SAPI/conf.d/$EXT.ini" ]; then
+ if [ ! $QUIET -eq 1 ]; then
echo "The $EXT extension is not enabled on the $SAPI SAPI!"
fi
@@ -71,12 +83,12 @@
exit 2
fi
else
- unlink "$PHPDIR/conf.d/$EXT_SO"
- if [ ! $QUIET -eq 1 ];then
+ unlink "$PHPDIR/conf.d/$EXT.ini"
+ if [ ! $QUIET -eq 1 ]; then
echo "The $EXT extension has been disabled on the $SAPI SAPI"
echo "In case $SAPI is a web server you might need to restart it"
fi
fi
-fi
+done
exit 0
Modified: php5/branches/rg-extension-manager/debian/php5enext
===================================================================
--- php5/branches/rg-extension-manager/debian/php5enext 2007-09-19 23:27:08 UTC (rev 881)
+++ php5/branches/rg-extension-manager/debian/php5enext 2007-09-20 00:45:45 UTC (rev 882)
@@ -7,6 +7,7 @@
PHPDIR="/etc/php5"
QUIET=0
FATAL=1
+MISSING_SAPI_IS_ERROR=1
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: php5enext SAPIS EXTENSION [verbose|quiet] [fatal|nonfatal]"
@@ -46,24 +47,35 @@
fi
EXT="$2"
-EXT_SO="$EXT.so"
SAPIS="$1"
if [ "$SAPIS" = "all" ]; then
SAPIS="apache2 cli cgi"
+ MISSING_SAPI_IS_ERROR=0
fi
for SAPI in $SAPIS; do
+ if [ ! -e "$PHPDIR/$SAPI" ]; then
+ if [ $MISSING_SAPI_IS_ERROR -eq 1 ]; then
+ if [ ! $QUIET -eq 1 ]; then
+ echo "The $SAPI SAPI doesn't seem to be installed!"
+ fi
+ exit 4
+ else
+ continue
+ fi
+ fi
+
# check for still-not-directory $SAPI/conf.d
- if [ ! -d "$PHPDIR/$SAPI/conf.d"]; then
- if [ ! $QUIET -eq 1 ];then
- echo "$PHPDIR/$SAPI/conf.d is not a directory!" > &2
+ if [ ! -d "$PHPDIR/$SAPI/conf.d" ]; then
+ if [ ! $QUIET -eq 1 ]; then
+ echo "$PHPDIR/$SAPI/conf.d is not a directory!"
fi
exit 3
fi
- if [ -L "$PHPDIR/$SAPI/conf.d/$EXT_SO" ]; then
- if [ ! $QUIET -eq 1 ];then
+ if [ -L "$PHPDIR/$SAPI/conf.d/$EXT.ini" ]; then
+ if [ ! $QUIET -eq 1 ]; then
echo "The $EXT extension is already enabled on the $SAPI SAPI"
fi
@@ -71,12 +83,12 @@
exit 2
fi
else
- ln -s "$PHPDIR/conf.d/$EXT_SO" "$PHPDIR/$SAPI/conf.d/"
- if [ ! $QUIET -eq 1 ];then
+ ln -s "$PHPDIR/conf.d/$EXT.ini" "$PHPDIR/$SAPI/conf.d/"
+ if [ ! $QUIET -eq 1 ]; then
echo "The $EXT extension has been enabled on the $SAPI SAPI"
echo "In case $SAPI is a web server you might need to restart it"
fi
fi
-fi
+done
exit 0
More information about the Pkg-php-commits
mailing list