From a5998e772140c3f985e3e1110b46ffc8f3cd059b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 2 Feb 2004 20:27:46 +0000 Subject: [PATCH] Minor fixes, dropped some old distro support --- ChangeLog | 6 ++++++ configure | 4 ++-- configure.in | 2 +- lib/execute.c | 8 ++++---- script/init.RedHat | 37 ++++--------------------------------- script/installinit.sh | 1 - 6 files changed, 17 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index a56e69c6..7c45a8a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ v0.39.9 29-Jan-2004 inetd or xinetd configuration for itn (tfido) calls. See the documentation of mbcico how to do this. + libcommon.a: + Increased the sync() delay time for execute from 200 to 300 mS. + mbcico: Added telnet input and output filters so we can now call and answer telnet (ITN) sessions. We don't need mbtelind anymore @@ -18,6 +21,9 @@ v0.39.9 29-Jan-2004 Clearing the working message is now only done by the keyboard read function. + script: + Dropped support for RedHat and Mandrake pre 6.1. + v0.39.8 26-Jan-2004 - 29-Jan-2004 diff --git a/configure b/configure index 4b15a56f..732dac5a 100755 --- a/configure +++ b/configure @@ -9456,7 +9456,7 @@ echo "$as_me:$LINENO: result: Configuration summary : Version : ..................... ${VERSION} - Hydra zlib compression : ...... ${ZLIBSUP} + Hydra/Binkp zlib compression : ${ZLIBSUP} " >&5 echo "${ECHO_T} @@ -9465,7 +9465,7 @@ echo "${ECHO_T} Configuration summary : Version : ..................... ${VERSION} - Hydra zlib compression : ...... ${ZLIBSUP} + Hydra/Binkp zlib compression : ${ZLIBSUP} " >&6 diff --git a/configure.in b/configure.in index c75bcdfb..6975c48b 100644 --- a/configure.in +++ b/configure.in @@ -356,7 +356,7 @@ AC_MSG_RESULT([ Configuration summary : Version : ..................... ${VERSION} - Hydra zlib compression : ...... ${ZLIBSUP} + Hydra/Binkp zlib compression : ${ZLIBSUP} ]) diff --git a/lib/execute.c b/lib/execute.c index d1f4f4e9..35743651 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -140,12 +140,12 @@ int execute(char *cmd, char *file, char *pkt, char *in, char *out, char *err) #ifdef __linux__ sync(); #endif - msleep(200); + msleep(300); rc = _execute(cmd, file, pkt, in, out, err); #ifdef __linux__ sync(); #endif - msleep(200); + msleep(300); return rc; } @@ -217,12 +217,12 @@ int execsh(char *cmd, char *in, char *out, char *err) #ifdef __linux__ sync(); #endif - msleep(200); + msleep(300); rc = _execsh(cmd, in, out, err); #ifdef __linux__ sync(); #endif - msleep(200); + msleep(300); return rc; } diff --git a/script/init.RedHat b/script/init.RedHat index f6cc4f1a..5e986a02 100644 --- a/script/init.RedHat +++ b/script/init.RedHat @@ -32,38 +32,9 @@ fi export MBSE_ROOT -SU="su" -# -# From RedHat version 6.1 and up the behaviour of "su" has changed. -# Extra tests are added for the RedHat e-smith server distribution, -# this is a special distribution based on RedHat. -# For Mandrake we follow the same behaviour. -# -if [ -f /etc/mandrake-release ]; then - # - # Mandrake 6.0 and newer, use "su -" - # - RHR="`cat /etc/mandrake-release | awk '{ print $4 }' | tr -d .`" - if [ $RHR -gt 60 ]; then - SU="su -" - fi -else - if [ -f /etc/redhat-release ]; then - if [ -z "`grep e-smith /etc/redhat-release`" ]; then - # Standard RedHat - RHR=`cat /etc/redhat-release | awk '{ print $5 }' | tr -d .` - else - # E-Smith server based on RedHat - RHR=`cat /etc/redhat-release | awk '{ print $13 }' | tr -d . | tr -d \)` - fi - if [ $RHR -gt 60 ]; then - SU="su -" - fi - fi -fi - # See how we were called. +# case "$1" in start) echo -n "Starting MBSE BBS: " @@ -71,11 +42,11 @@ case "$1" in rm -f ${MBSE_ROOT}/sema/* rm -f ${MBSE_ROOT}/var/*.LCK rm -f ${MBSE_ROOT}/tmp/mb* - $SU mbse -c '${MBSE_ROOT}/bin/mbtask' >/dev/null + su - mbse -c '${MBSE_ROOT}/bin/mbtask' >/dev/null echo -n "mbtask " sleep 2 if [ -f ${MBSE_ROOT}/etc/config.data ]; then - $SU mbse -c '${MBSE_ROOT}/bin/mbstat open -quiet' + su - mbse -c '${MBSE_ROOT}/bin/mbstat open -quiet' echo "opened" fi touch /var/lock/subsys/mbsed @@ -84,7 +55,7 @@ case "$1" in echo -n "Shutting down MBSE BBS: " if [ -f ${MBSE_ROOT}/var/run/mbtask ]; then echo -n "logoff users " - $SU mbse -c '${MBSE_ROOT}/bin/mbstat close wait -quiet' >/dev/null + su - mbse -c '${MBSE_ROOT}/bin/mbstat close wait -quiet' >/dev/null echo -n "done, " echo -n "stop mbtask: " killproc mbtask -15 diff --git a/script/installinit.sh b/script/installinit.sh index 2607981d..54f472bb 100644 --- a/script/installinit.sh +++ b/script/installinit.sh @@ -7,7 +7,6 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:${MBSE_ROOT}/bin DISTNAME= DISTVERS= DISTINIT= -SU="su" OSTYPE=`uname -s` #------------------------------------------------------------------------