#!/bin/sh set -e # if [ "$1" = "configure" ]; then # specific database modules are optional, but we tell the user if # support for a database is missing: DEFAULT_DB_TYPE=""; if test -e ${SLX_CONFIG_PATH}/settings; then echo "Reading local settings..."; . ${SLX_CONFIG_PATH}/settings; fi; for m in ${SLX_DB_TYPE} SQLite mysql; do perl -I/opt/openslx/lib -Ilib -Iconfig-db -e "use OpenSLX::MetaDB::$m"; if [ $? -gt 0 ] ; then echo -e " 'DBD::$m' not found (or too old), so $m-databases will not be \ supported."; else if test "${DEFAULT_DB_TYPE}X" = "X"; then DEFAULT_DB_TYPE=$m; echo " db-type => $m"; fi; fi; done; if test "${DEFAULT_DB_TYPE}X" = "X"; then echo " None of the DB-modules is available! Please install one of them."; echo " For SQLite usage:"; echo " # aptitude install libdbd-sqlite3-perl"; echo " For MySQL usage:"; echo " # aptitude install libdbd-mysql-perl"; echo " or use CPAN to install the requred perl bindings" else echo ${DEFAULT_DB_TYPE} >/opt/openslx/DEFAULT-DB-TYPE; fi; if ! which rsync >/dev/null 2>&1; then echo " rsync is required, please install it."; echo " # aptitude install rsync"; fi; # fi exit 0;