+++ /dev/null
-#!/bin/sh
-
-VERSION="$0 V 0.3 (c) 2001 Artur Frysiak, (c) 2005 Elan Ruusamäe"
-COMMAND=usage
-VERBOSE=""
-MODNAME=""
-INIFILE=""
-
-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
-}
-
-deinstall()
-{
- if [ -f ${INIFILE} ] && grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE}; then
- sed -i -e "/^extension[[:space:]]*=[[:space:]]*${MODNAME}.so/d" ${INIFILE}
- fi
-}
-
-usage()
-{
- echo $VERSION
- echo "Usage:"
- echo " $0 install MODNAME INIFILE"
- echo " $0 remove MODNAME INIFILE"
-}
-
-if [ "$#" = 3 ]; then
- MODNAME="$2"
- INIFILE="$3"
-
- if [ "$1" = "install" ]; then
- install
- else
- if [ "$1" = "remove" ]; then
- deinstall
- else
- usage
- fi
- fi
-else
- usage
- exit 1
-fi
-
-exit 0