Added installation support for Gentoo

This commit is contained in:
Michiel Broek 2003-11-10 19:06:32 +00:00
parent 86bd7c8e20
commit f358cb72c8
5 changed files with 105 additions and 13 deletions

View File

@ -15,6 +15,8 @@ v0.39.1 22-Oct-2003
/etc/inetd.conf or /etc/xinetd.d/mbsebbs or /etc/xinetd.conf. /etc/inetd.conf or /etc/xinetd.d/mbsebbs or /etc/xinetd.conf.
Also check mbsetup 1.14.3 and remove any ITN flag in there. Also check mbsetup 1.14.3 and remove any ITN flag in there.
Updated all documentation to validate html makeup. Updated all documentation to validate html makeup.
Added installation support for Gentoo Linux, contributed by
Capitán X.
upgrade: upgrade:
If you don't have any personal archivers, then remove If you don't have any personal archivers, then remove
@ -52,6 +54,9 @@ v0.39.1 22-Oct-2003
mbtask: mbtask:
Removed support for ITN. Removed support for ITN.
script:
Added install scripts for Gentoo.
v0.39.0 09-Oct-2003 - 22-Oct-2003 v0.39.0 09-Oct-2003 - 22-Oct-2003

View File

@ -99,6 +99,10 @@ if [ "$OSTYPE" = "Linux" ]; 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.
DISTNAME="Slackware" DISTNAME="Slackware"
DISTVERS="Old" DISTVERS="Old"
else
if [ -f /etc/gentoo-release ]; then
DISTNAME="Gentoo"
DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'`
else else
DISTNAME="Unknown" DISTNAME="Unknown"
fi fi
@ -107,6 +111,7 @@ if [ "$OSTYPE" = "Linux" ]; then
fi fi
fi fi
fi fi
fi
fi # Linux fi # Linux
if [ "$OSTYPE" = "FreeBSD" ]; then if [ "$OSTYPE" = "FreeBSD" ]; then
DISTNAME="FreeBSD" DISTNAME="FreeBSD"

View File

@ -5,7 +5,7 @@ include ../Makefile.global
OTHER = Makefile README maint midnight weekly monthly installinit.sh rc rc.shutdown \ OTHER = Makefile README maint midnight weekly monthly installinit.sh rc rc.shutdown \
mbse.start mbse.stop bbsdoor.sh rundoor.sh init.Debian init.RedHat \ mbse.start mbse.stop bbsdoor.sh rundoor.sh init.Debian init.RedHat \
init.Slackware init.SuSE hatch editor.in bbsjoerc bbsjmacsrc init.Slackware init.SuSE init.Gentoo hatch editor.in bbsjoerc bbsjmacsrc
#################################################################################################### ####################################################################################################

60
script/init.Gentoo Normal file
View File

@ -0,0 +1,60 @@
#!/sbin/runscript
#
# $Id$
#
# description: Starts and stops the MBSE BBS.
#
# For Gentoo GNU/Linux (by Capitán X).
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
if [ "$MBSE_ROOT" = "" ]; then
echo "MBSE BBS: No 'mbse' user in the password file."
exit 1
fi
if [ ! -d $MBSE_ROOT ]; then
echo "MBSE BBS: Home directory '$MBSE_ROOT' not found."
exit 1
fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$MBSE_ROOT/bin
DAEMON=$MBSE_ROOT/bin/mbtask
NAME=mbsebbs
DESC="MBSE BBS"
export MBSE_ROOT
depend() {
need localmount
}
start() {
ebegin "Starting mbse"
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
echo -n "mbtask "
sleep 2
if [ -f $MBSE_ROOT/etc/config.data ]; then
su mbse -c '$MBSE_ROOT/bin/mbstat open -quiet'
echo -n "opened "
fi
eend $? "Loading error."
}
stop() {
ebegin "Stopping mbse"
if [ -f $MBSE_ROOT/etc/config.data ]; then
echo -n "logoff users "
su mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null
fi
kill `pidof mbtask`
eend $? "Stopping error."
}

View File

@ -107,6 +107,10 @@ if [ "$OSTYPE" = "Linux" ]; 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.
DISTNAME="Slackware" DISTNAME="Slackware"
DISTVERS="Old" DISTVERS="Old"
else
if [ -f /etc/gentoo-release ]; then
DISTNAME="Gentoo"
DISTVERS=`cat /etc/gentoo-release | awk '{ print $5 }'`
else else
DISTNAME="Unknown" DISTNAME="Unknown"
log "!" "unknown distribution, collecting data" log "!" "unknown distribution, collecting data"
@ -124,6 +128,7 @@ if [ "$OSTYPE" = "Linux" ]; then
fi fi
fi fi
fi fi
fi
if [ "$OSTYPE" = "FreeBSD" ]; then if [ "$OSTYPE" = "FreeBSD" ]; then
DISTNAME="FreeBSD" DISTNAME="FreeBSD"
DISTVERS=`uname -r` DISTVERS=`uname -r`
@ -206,8 +211,8 @@ if [ "$DISTNAME" = "Slackware" ]; then
chmod 744 $MBSE_ROOT/etc/rc $MBSE_ROOT/etc/rc.shutdown chmod 744 $MBSE_ROOT/etc/rc $MBSE_ROOT/etc/rc.shutdown
else else
DISTINIT="/etc/rc.d/init.d/mbsed" DISTINIT="/etc/rc.d/init.d/mbsed"
echo "Adding SystemV Slackware MBSE BBS start/stop scripts" echo "Adding SystemV Slackware $DISTVERS MBSE BBS start/stop scripts"
log "+" "Adding SystemV Slackware MBSE BBS start/stop scripts" log "+" "Adding SystemV Slackware $DISTVERS MBSE BBS start/stop scripts"
checkrcdir checkrcdir
cp init.Slackware $DISTINIT cp init.Slackware $DISTINIT
chmod 755 $DISTINIT chmod 755 $DISTINIT
@ -314,6 +319,23 @@ if [ "$DISTNAME" = "Debian" ]; then
fi fi
#-------------------------------------------------------------------------
#
# Adding scripts for Gentoo
#
#
if [ "$DISTNAME" = "Gentoo" ]; then
echo "You are running Gentoo Linux $DISTVERS"
log "+" "Adding Gentoo init script"
DISTINIT="/etc/init.d/mbsebbs"
cp init.Gentoo $DISTINIT
chmod 755 $DISTINIT
update-rc mbsebbs defaults
echo "Gentoo install ready."
log "+" "Gentoo init script installed"
fi
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# #
# Adding scripts for NetBSD # Adding scripts for NetBSD