Changes for the e-smith RedHat based distribution

This commit is contained in:
Michiel Broek 2002-01-18 21:31:12 +00:00
parent 4a4154acc0
commit c9d9504f4d
3 changed files with 35 additions and 11 deletions

View File

@ -4256,11 +4256,15 @@ v0.33.19 26-Oct-2001
mblogin and mbuseradd. mblogin and mbuseradd.
Started NetBSD port. Not working yet but does compile. Started NetBSD port. Not working yet but does compile.
SETUP.sh SETUP.sh:
Better grep to check for excisting usernames like bbs, mbse. Better grep to check for excisting usernames like bbs, mbse.
Ported to NetBSD. Ported to NetBSD.
Added support for xinetd configuration. Added support for xinetd configuration.
Changed distribution test for Mandrake. 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: libcommon.a:
When adding seenby entries, the zone number is copied from the When adding seenby entries, the zone number is copied from the

View File

@ -90,7 +90,11 @@ if [ "$OSTYPE" = "Linux" ]; then
else else
if [ -f /etc/redhat-release ]; then if [ -f /etc/redhat-release ]; then
DISTNAME="RedHat" 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 else
if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then 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. # If Slackware wasn't detected yet it is version 4.0 or older.
@ -233,6 +237,7 @@ echo ""
echo -n "Adding group 'bbs'" echo -n "Adding group 'bbs'"
$PW groupadd bbs $PW groupadd bbs
log "+" "[$?] Added group bbs" log "+" "[$?] Added group bbs"
echo -n ", user 'mbse'" echo -n ", user 'mbse'"
if [ "$OSTYPE" = "Linux" ]; then if [ "$OSTYPE" = "Linux" ]; then
useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse
@ -487,6 +492,10 @@ EOF
fi 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 ""
echo -n "Press Enter to continue" echo -n "Press Enter to continue"
read junk read junk

View File

@ -97,7 +97,11 @@ if [ "$OSTYPE" = "Linux" ]; then
else else
if [ -f /etc/redhat-release ]; then if [ -f /etc/redhat-release ]; then
DISTNAME="RedHat" 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 else
if [ -f /etc/rc.d/rc.0 ] && [ -f /etc/rc.d/rc.local ]; then 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. # If Slackware wasn't detected yet it is version 4.0 or older.
@ -131,7 +135,6 @@ if [ "$OSTYPE" = "NetBSD" ]; then
fi fi
log "+" "Distribution $OSTYPE $DISTNAME $DISTVERS" 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 # FIXME: some details unknown about Mandrake
# #
if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then 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" DISTINIT="/etc/rc.d/init.d/mbsed"
SU="su" SU="su"
# #
# From RedHat version 6.1 and up the behaviour of "su" has changed. # 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. # For Mandrake we follow the same behaviour.
# #
if [ -f /etc/redhat-release ]; then 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 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 -" SU="su -"
else else
echo "You are running RedHat v6.0 or older" echo "You are running $RHN v6.0 or older"
fi fi
else else
if [ -f /etc/mandrake-release ]; then if [ -f /etc/mandrake-release ]; then
@ -414,8 +425,8 @@ cat << EOF >$DISTINIT
# chkconfig: 345 99 05 # chkconfig: 345 99 05
# description: Starts and stops MBSE BBS. # description: Starts and stops MBSE BBS.
# #
# For RedHat and Mandrake SYSV init style. # For RedHat, E-Smith and Mandrake SYSV init style.
# 23-May-2001 M. Broek # 18-Jan-2002 M. Broek
# #
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions