SOURCES: php-module-install - updated from php4-module-install
glen
glen at pld-linux.org
Tue Aug 16 11:36:56 CEST 2005
Author: glen Date: Tue Aug 16 09:36:56 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated from php4-module-install
---- Files affected:
SOURCES:
php-module-install (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SOURCES/php-module-install
diff -u SOURCES/php-module-install:1.6 SOURCES/php-module-install:1.7
--- SOURCES/php-module-install:1.6 Sun Jun 23 16:17:00 2002
+++ SOURCES/php-module-install Tue Aug 16 11:36:51 2005
@@ -1,38 +1,24 @@
#!/bin/sh
-VERSION="$0 V 0.1 (C) 2001 Artur Frysiak"
+VERSION="$0 V 0.3 (C) 2001 Artur Frysiak, Elan Ruusamäe"
COMMAND=usage
VERBOSE=""
MODNAME=""
INIFILE=""
-install ()
+install()
{
-if [ -f ${INIFILE} ] && ! grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE} ; then
- echo "activating module '${MODNAME}.so' in ${INIFILE}" 1>&2
- echo "extension=${MODNAME}.so" >> ${INIFILE}
-fi
-if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
-fi
+ if [ -f ${INIFILE} ] && ! grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE}; then
+ echo "activating module '${MODNAME}.so' in ${INIFILE}" 1>&2
+ echo "extension=${MODNAME}.so" >> ${INIFILE}
+ fi
}
deinstall()
{
-if [ -f ${INIFILE} ] && grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE} ; then
- TMPFILE=`mktemp -q /tmp/php-module-install.XXXXXX`
- if [ $? -ne 0 ]; then
- echo "$0: Can't create temp file, exiting..."
- exit 1
+ if [ -f ${INIFILE} ] && grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE}; then
+ sed -i -e "/^extension[[:space:]]*=[[:space:]]*${MODNAME}.so/d" ${INIFILE}
fi
- echo "deactivating module '${MODNAME}.so' in ${INIFILE}" 1>&2
- grep -v "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" > ${TMPFILE} < ${INIFILE}
- mv ${TMPFILE} ${INIFILE}
- chmod 644 ${INIFILE}
-fi
-if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
-fi
}
usage()
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/php-module-install?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list