From 9cd9d862184952cd1b0c5090b9d6226cdf248b62 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Wed, 22 Nov 2006 15:53:38 +0000 Subject: [PATCH] removed some preinst stuff which may have caused #1996 --- .../etc/debian/campcaster-station.preinst | 76 +------------------ 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/campcaster/etc/debian/campcaster-station.preinst b/campcaster/etc/debian/campcaster-station.preinst index 377173b96..b3e466671 100644 --- a/campcaster/etc/debian/campcaster-station.preinst +++ b/campcaster/etc/debian/campcaster-station.preinst @@ -14,84 +14,10 @@ set -e # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package -#------------------------------------------------------------------------------- -# Function to check for a group to be available, and the ability -# to set files to belong into that group -# -# @param $1 the group to check -# @return 0 if the groups id OK, non-0 otherwise -#------------------------------------------------------------------------------- -check_group_permission() { - group_tmp_file=/tmp/ls_group_check.$$ - touch $group_tmp_file - test_result=`chgrp $1 $group_tmp_file 2> /dev/null` - if [ $? != 0 ]; then - rm -f $group_tmp_file; - echo "Unable to use apache deamon group $1."; - echo "Please check if $1 is a correct user group."; - return 1; - fi - rm -f $group_tmp_file; - echo "Apache daemon group $1 OK."; - - return 0; -} - -#------------------------------------------------------------------------------- -# Function to check for the existence of an executable on the PATH -# -# @param $1 the name of the exectuable -# @return 0 if the executable exists on the PATH, non-0 otherwise -#------------------------------------------------------------------------------- -check_exe() { - if [ -x "`which $1 2> /dev/null`" ]; then - echo "Exectuable $1 found..."; - return 0; - else - echo "Exectuable $1 not found..."; - return 1; - fi -} - - -#------------------------------------------------------------------------------- -# Function to check for a PEAR module -# -# @param $1 the name of the PEAR module -# @return 0 if the module is available, non-0 otherwise -#------------------------------------------------------------------------------- -check_pear_module() { - test_result=`pear info $1` - if [ $? = 0 ]; then - echo "PEAR module $1 found..."; - return 0; - else - echo "PEAR module $1 not found..."; - return 1; - fi -} - - -#------------------------------------------------------------------------------- -# Variables -#------------------------------------------------------------------------------- -apache_group=www-data - - case "$1" in install|upgrade) - echo "Checking for required tools..." - - check_exe "sed" || exit 1; - check_exe "psql" || exit 1; - check_exe "php" || exit 1; - check_exe "pear" || exit 1; - check_exe "odbcinst" || exit 1; - - echo "Checking for validity of apache daemon group $apache_group..."; - check_group_permission $apache_group || exit 1; - if [ "$1" = "upgrade" ]; then + echo "Stopping the campcaster-scheduler daemon..." /etc/init.d/campcaster-scheduler stop || true /etc/init.d/campcaster-scheduler kill || true fi