Script updates for Mandrake

This commit is contained in:
Michiel Broek 2002-01-20 20:26:30 +00:00
parent bd953f7b3e
commit 271d897e1c
2 changed files with 40 additions and 27 deletions

View File

@ -464,7 +464,7 @@ service binkp
user = mbse user = mbse
instances = 10 instances = 10
server = $MHOME/bin/mbcico server = $MHOME/bin/mbcico
server-args = -t ibn server_args = -t ibn
} }
service tfido service tfido
@ -475,7 +475,7 @@ service tfido
user = mbse user = mbse
instances = 10 instances = 10
server = $MHOME/bin/mbcico server = $MHOME/bin/mbcico
server-args = -t itn server_args = -t itn
} }
service fido service fido
@ -486,7 +486,7 @@ service fido
user = mbse user = mbse
instances = 10 instances = 10
server = $MHOME/bin/mbcico server = $MHOME/bin/mbcico
server-args = -t ifc server_args = -t ifc
} }
EOF EOF

View File

@ -93,7 +93,7 @@ if [ "$OSTYPE" = "Linux" ]; then
if [ -f /etc/mandrake-release ]; then if [ -f /etc/mandrake-release ]; then
DISTNAME="Mandrake" DISTNAME="Mandrake"
# Format: Linux Mandrake release 8.0 (Cooker) for i586 # Format: Linux Mandrake release 8.0 (Cooker) for i586
DISTVERS=`cat /etc/mandrake-release | awk '{ print $4 }'` DISTVERS="`cat /etc/mandrake-release | awk '{ print $4 }'`"
else else
if [ -f /etc/redhat-release ]; then if [ -f /etc/redhat-release ]; then
DISTNAME="RedHat" DISTNAME="RedHat"
@ -377,7 +377,6 @@ fi
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# #
# Adding scripts for RedHat, e-smith and Mandrake # Adding scripts for RedHat, e-smith and Mandrake
# FIXME: some details unknown about Mandrake
# #
if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then
@ -390,28 +389,28 @@ if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then
# this is a special distribution based on RedHat. # 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/mandrake-release ]; then
if [ -z "`grep e-smith /etc/redhat-release`" ]; then RHR="`cat /etc/mandrake-release | awk '{ print $4 }' | tr -d .`"
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 $RHN v6.1 or newer" echo "You are running Mandrake v6.1 or newer"
SU="su -" SU="su -"
else else
echo "You are running $RHN v6.0 or older" echo "You are running Mandrake v6.0 or older"
fi fi
else else
if [ -f /etc/mandrake-release ]; then if [ -f /etc/redhat-release ]; then
RHR=`cat /etc/mandrake-release | awk '{ print $4 }' | tr -d .` if [ -z "`grep e-smith /etc/redhat-release`" ]; then
if [ $RHR -gt 60 ]; then RHR=`cat /etc/redhat-release | awk '{ print $5 }' | tr -d .`
echo "You are running Mandrake v6.1 or newer" RHN="RedHat"
SU="su -"
else else
echo "You are running Mandrake v6.0 or older" 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 $RHN v6.1 or newer"
SU="su -"
else
echo "You are running $RHN v6.0 or older"
fi fi
else else
echo "You are in big trouble." echo "You are in big trouble."
@ -422,11 +421,11 @@ if [ "$DISTNAME" = "RedHat" ] || [ "$DISTNAME" = "Mandrake" ]; then
cat << EOF >$DISTINIT cat << EOF >$DISTINIT
#!/bin/sh #!/bin/sh
# #
# chkconfig: 345 99 05 # chkconfig: 345 95 05
# description: Starts and stops MBSE BBS. # description: Starts and stops MBSE BBS.
# #
# For RedHat, E-Smith and Mandrake SYSV init style. # For RedHat, E-Smith and Mandrake SYSV init style.
# 18-Jan-2002 M. Broek # 20-Jan-2002 M. Broek
# #
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
@ -496,10 +495,24 @@ esac
exit 0 exit 0
EOF EOF
chmod 755 $DISTINIT chmod 755 $DISTINIT
echo "With the runlevel editor, 'tksysv' if you are running X," echo "Making links for stop in runlevels 0 and 6"
echo "or 'ntsysv' if you are running virtual consoles, you must" if [ -f /etc/rc.d/rc0.d/K05mbsed ]; then
echo "now add 'mbsed' start to the default runlevel, and 'mbsed'" rm /etc/rc.d/rc0.d/K05mbsed
echo "stop to runlevels 0 and 6" fi
ln -s ../init.d/mbsed /etc/rc.d/rc0.d/K05mbsed
if [ -f /etc/rc.d/rc6.d/K05mbsed ]; then
rm /etc/rc.d/rc6.d/K05mbsed
fi
ln -s ../init.d/mbsed /etc/rc.d/rc6.d/K05mbsed
echo "Making links for start in runlevels 3 and 5"
if [ -f /etc/rc.d/rc3.d/S95mbsed ]; then
rm /etc/rc.d/rc3.d/S95mbsed
fi
ln -s ../init.d/mbsed /etc/rc.d/rc3.d/S95mbsed
if [ -f /etc/rc.d/rc5.d/S95mbsed ]; then
rm /etc/rc.d/rc5.d/S95mbsed
fi
ln -s ../init.d/mbsed /etc/rc.d/rc5.d/S95mbsed
fi fi