Author: glen                         Date: Sat Jul  9 22:27:47 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- cosmetics

---- Files affected:
SOURCES:
   php4-module-install (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/php4-module-install
diff -u SOURCES/php4-module-install:1.7 SOURCES/php4-module-install:1.8
--- SOURCES/php4-module-install:1.7     Sat Jul  9 22:53:13 2005
+++ SOURCES/php4-module-install Sun Jul 10 00:27:41 2005
@@ -6,41 +6,43 @@
 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
-# restart only if there's module installed
-if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
-if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f /var/lock/subsys/apache 
]; then
-       /etc/rc.d/init.d/apache 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
+
+       # restart only if there's module installed
+       if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd restart 1>&2
+       fi
+       if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
+       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
-       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
-# restart only if there's module installed
-if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
-if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f /var/lock/subsys/apache 
]; then
-       /etc/rc.d/init.d/apache restart 1>&2
-fi
+       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
+               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
+
+       # restart only if there's module installed
+       if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd restart 1>&2
+       fi
+       if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f 
/var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
+       fi
 }
 
 usage()
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/php4-module-install?r1=1.7&r2=1.8&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to