diff --git a/ChangeLog b/ChangeLog index fdefe6fa..478080dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4256,11 +4256,15 @@ v0.33.19 26-Oct-2001 mblogin and mbuseradd. Started NetBSD port. Not working yet but does compile. - SETUP.sh + SETUP.sh: Better grep to check for excisting usernames like bbs, mbse. Ported to NetBSD. Added support for xinetd configuration. Changed distribution test for Mandrake. + Changed to recognize the e-smith server based on RedHat. + + installinit.sh: + Changed to recognize the e-smith server based on RedHat. libcommon.a: When adding seenby entries, the zone number is copied from the diff --git a/SETUP.sh b/SETUP.sh index b8ee9c41..5a9edc0c 100644 --- a/SETUP.sh +++ b/SETUP.sh @@ -90,7 +90,11 @@ if [ "$OSTYPE" = "Linux" ]; then else if [ -f /etc/redhat-release ]; then DISTNAME="RedHat" - DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` + if [ -z "`grep e-smith /etc/redhat-release`" ]; then + DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` + else + DISTVERS=`cat /etc/redhat-release | awk '{ print $13 }' | tr -d \)` + fi else if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then # If Slackware wasn't detected yet it is version 4.0 or older. @@ -233,6 +237,7 @@ echo "" echo -n "Adding group 'bbs'" $PW groupadd bbs log "+" "[$?] Added group bbs" + echo -n ", user 'mbse'" if [ "$OSTYPE" = "Linux" ]; then useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse @@ -487,6 +492,10 @@ EOF fi +# We made it, copy the logfile to mbse's homedir so that when the +# /tmp directory is cleaned, we still have it. +cat SETUP.log >> $MHOME/SETUP.log + echo "" echo -n "Press Enter to continue" read junk diff --git a/script/installinit.sh b/script/installinit.sh index 7ec92f30..bbe87ba5 100644 --- a/script/installinit.sh +++ b/script/installinit.sh @@ -97,7 +97,11 @@ if [ "$OSTYPE" = "Linux" ]; then else if [ -f /etc/redhat-release ]; then DISTNAME="RedHat" - DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` + if [ -z "`grep e-smith /etc/redhat-release`" ]; then + DISTVERS=`cat /etc/redhat-release | awk '{ print $5 }'` + else + DISTVERS=`cat /etc/redhat-release | awk '{ print $13 }' | tr -d \)` + fi else if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then # If Slackware wasn't detected yet it is version 4.0 or older. @@ -131,7 +135,6 @@ if [ "$OSTYPE" = "NetBSD" ]; then fi - log "+" "Distribution $OSTYPE $DISTNAME $DISTVERS" @@ -373,25 +376,33 @@ fi #-------------------------------------------------------------------------- # -# Adding scripts for RedHat and Mandrake +# Adding scripts for RedHat, e-smith and Mandrake # FIXME: some details unknown about Mandrake # if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then - log "+" "Adding RedHat/Mandrake SystemV init scripts" + log "+" "Adding RedHat/E-Smith/Mandrake SystemV init scripts" DISTINIT="/etc/rc.d/init.d/mbsed" 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/redhat-release ]; then - RHR=`cat /etc/redhat-release | awk '{ print $5 }' | tr -d .` + if [ -z "`grep e-smith /etc/redhat-release`" ]; then + RHR=`cat /etc/redhat-release | awk '{ print $5 }' | tr -d .` + RHN="RedHat" + else + RHR=`cat /etc/redhat-release | awk '{ print $13 }' | tr -d . | tr -d \)` + RHN="e-smith based on RedHat" + fi if [ $RHR -gt 60 ]; then - echo "You are running RedHat v6.1 or newer" + echo "You are running $RHN v6.1 or newer" SU="su -" else - echo "You are running RedHat v6.0 or older" + echo "You are running $RHN v6.0 or older" fi else if [ -f /etc/mandrake-release ]; then @@ -414,8 +425,8 @@ cat << EOF >$DISTINIT # chkconfig: 345 99 05 # description: Starts and stops MBSE BBS. # -# For RedHat and Mandrake SYSV init style. -# 23-May-2001 M. Broek +# For RedHat, E-Smith and Mandrake SYSV init style. +# 18-Jan-2002 M. Broek # # Source function library. . /etc/rc.d/init.d/functions